How to delete a tag in Git

Deleting Git tags is necessary when fixing versioning mistakes, removing test releases, or cleaning up incorrect tags in your repository. As the creator of CoreUI with over 25 years of version control experience, I’ve had to clean up tags during release processes and version management. The most important aspect is understanding the difference between deleting local tags and remote tags, as they require separate commands. Always delete both local and remote tags to maintain consistency across all repository copies.

Use git tag -d to delete local tags and git push --delete to remove tags from remote repository.

# Delete a local tag
git tag -d v1.2.0

# Delete a remote tag
git push origin --delete tag v1.2.0

# Alternative syntax for deleting remote tag
git push origin :refs/tags/v1.2.0

# Delete multiple local tags
git tag -d v1.2.0 v1.2.1 v1.2.2

The git tag -d command removes tags from your local repository only. To delete the tag from the remote repository, use git push origin --delete tag tagname or the older syntax git push origin :refs/tags/tagname. Deleting a local tag doesn’t affect remote repositories, so you must delete both separately. You can delete multiple local tags in a single command by listing them after -d.

Best Practice Note:

This tag cleanup process is used in CoreUI’s release workflow to maintain clean version histories. Always communicate tag deletions with your team, as removing shared tags can cause confusion for other developers who have already pulled them.


Speed up your responsive apps and websites with fully-featured, ready-to-use open-source admin panel templates—free to use and built for efficiency.


About the Author