Cheat Sheets · Git Cheat Sheet · Git Delete Remote Tag — Local and Remote

Git Delete Remote Tag — Local and Remote

Local

git tag -d

Remote

git push origin --delete

Remote (Legacy)

git push origin :refs/tags/

Tag deletion commands

TargetCommandEffect
Localgit tag -d <tagname>Delete tag reference from local repository
Remotegit push origin --delete <tagname>Delete tag on remote repository (modern syntax)
Remote (Legacy)git push origin :refs/tags/<tagname>Old refspec syntax (same effect)

When a release tag was created on the wrong commit or with a typo, delete it from both your local repository and the remote server.

Related Git recipes

FAQ

Why does the tag reappear after git fetch?
If teammates still have the tag locally and push with git push --tags, it will be recreated. Ask collaborators to delete it locally as well.

How do I list all existing tags?
Run git tag -l or git tag -n to see tags with their annotations.

How do I delete all local tags that do not exist on remote?
Run git tag -l | xargs git tag -d && git fetch --tags.

Stop memorizing — build it interactively

Try tag commands in the Git Builder

Full reference: Git Cheat Sheet