Git: Delete Tags From Both Local and Remote Repositories

John John (304)
2 minutes

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.


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

Continue reading to see a breakdown of each command.

Posted in these interests:
h/git16 guides
h/code69 guides

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>

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.

John John (304)
5 minutes

As a Kubernetes user, I find that I often need to trigger a kubernetes cron job manually, outside of its schedule. Fortunately, since the release of Kubernetes 1.