Git: Delete Tags From Both Local and Remote Repositories

Cleaning up unused tags is an important part of Git housekeeping. This guide will show you how to delete tags from both local and remote Git repositories.

tl;dr

git push --delete origin <tag_name>
git tag -d <tag_name>

Continue reading to see a breakdown of each command.

1

As of Git 1.7.0 you can use git push --delete to delete a remote branch or tag.

git push --delete <remote_name> <tag_name>

In most cases, the remote name is origin, so you'll use:

git push --delete origin <tag_name>
2

Deleting a tag from your local repository is easy:

git tag -d <tag_name>

So, git tag -a <tag_name> adds a tag, and git tag -d <tag_name> deletes a tag.