How to delete a remote tag in GIT


To delete a remote tag in Git, you can use the git push command with the --delete option followed by the name of the tag. Here are the steps:

  • Open a terminal or command prompt and navigate to the Git repository that contains the remote tag you want to delete.
  • Use the git tag command to list all of the tags that currently exist in the repository. Find the name of the tag that you want to delete.
git tag
  • Use the git push command with the --delete option followed by the name of the tag to delete it. For example, to delete a tag named v1.0.0 on the origin remote, use the following command:
git push origin --delete v1.0.0
This will delete the remote tag named v1.0.0 on the origin remote.
  • Use the git tag command again to verify that the remote tag has been deleted:
git tag
  1. The deleted tag should no longer appear in the list.

Note that deleting a remote tag will remove it from all remote repositories that it exists in. Deleting a tag does not delete the corresponding commit or any branches that may be associated with it.