Cheat Sheets · Git Cheat Sheet · Git Delete Remote Tag — Local and Remote
Git Delete Remote Tag — Local and Remote
Localgit tag -d
Remotegit push origin --delete
Remote (Legacy)git push origin :refs/tags/
Tag deletion commands
| Target | Command | Effect |
|---|---|---|
Local | git tag -d <tagname> | Delete tag reference from local repository |
Remote | git 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
Undo Last Commit — 3 Safe Ways
Discard Local Changes — Safely and Completely
Delete a Branch — Local and Remote
Stash — Park Changes Without Committing
Amend the Last Commit
Undo a Pushed Commit — The Safe Way (git revert)
Rename Local Branch — Safely & Quickly
Rename Remote Branch — Complete 3-Step Process
Cherry Pick — Apply a Specific Commit Elsewhere
Squash Last N Commits — Combine Multiple Commits
Sync Fork with Upstream — Step-by-Step
Change Commit Author — Email & Name
Unstage File — Remove from Staging Area
Log Graph — Visual Commit History in Terminal
Clean Untracked Files — Remove Clutter Safely
Switch Branch — Modern Branch Navigation
Create Branch from Commit — Branch Off History
Stash Untracked Files (-u and -a Flags)
Force Pull — Overwrite Local Changes with Remote
Resolve Merge Conflict — Complete Workflow
Show Commit — Inspect Changes in a Commit
Tag a Release — Lightweight & Annotated Tags
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 BuilderFull reference: Git Cheat Sheet