Categories
Software

Delete git tags

To list all tags in your remote repository that include the word ‘Jenkins’ and end with a number:

git ls-remote --tags origin | awk '/Jenkins(.*)[0-9]$/{ print $2 }'

To delete all of those tags:

git ls-remote --tags origin | awk '/Jenkins(.*)[0-9]$/{ print ":" $2 }' | xargs git push origin