Delete all git tags from a project

To delete the git tags on the remote (e.g. Github or GitLab) you need to have the tags locally - as it uses the local list.

Ensure you have the tags locally by running git fetch origin, you can then run git tag to confirm there are tags there.

Removing the tags from remote can then be done with:

git push origin --delete $(git tag -l)

This passes the result of git tag -l into the --delete parameter.

To delete locally, you can run:

git tag -d $(git tag)

View this post on Github

You might also enjoy…

Mike Street

Written by Mike Street

Mike is a CTO and Lead Developer from Brighton, UK. He spends his time writing, cycling and coding. You can find Mike on Mastodon.