How to remove all git origin and local tags? How to remove all git origin and local tags? git git

How to remove all git origin and local tags?


  1. Delete All local tags. (Optional Recommended)

    git tag -d $(git tag -l)
  2. Fetch remote All tags. (Optional Recommended)

    git fetch
  3. Delete All remote tags.

    git push origin --delete $(git tag -l) # Pushing once should be faster than multiple times
  4. Delete All local tags.

    git tag -d $(git tag -l)


For windows using command prompt:

Deleting local tags:

for /f "tokens=* delims=" %a in ('git tag -l') do git tag -d %a

Deleting remote tags:

for /f "tokens=* delims=" %a in ('git tag -l') do git push --delete origin %a