0

Deleted (locally and remotely) tag for a git repository.

git tag -d v13.0.0
git push origin :refs/tags/v13.0.0

I had created tag v13.0.0 and then deleted.

But still I can do go get github.com/IBM/nzgo@v13.0.0

Do I need to delete it any other way?

I can see there is no v13.0.0 tag here: https://github.com/IBM/nzgo/tags

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
  • 1
    `go get` obtains tag-to-hash-ID translations and then *keeps them*. Deleting the tag (or changing it) doesn't alter the cached translation. (This is one of many reasons that Git tags should never be changed: it just doesn't *work*.) – torek Aug 03 '21 at 05:46
  • Thanks @torek. Is there any way we can get list of such tags, deleted ones but available in go get? – sandippawar1412 Aug 03 '21 at 05:53
  • See https://golang.org/ref/mod#module-cache - I have not used this a lot, but it's clear that the big Brute Force Hammer is `go clean -modcache` and `go mod verify` *might* be better for this (having not tried it, I don't know). – torek Aug 03 '21 at 06:02

1 Answers1

2

Published modules can not be deleted but only be retracted. Please have a look at this on how to retract a version. answer.

From documentation

To keep module builds deterministic, a version cannot be modified after it is published. Even if you delete or change a version tag, proxy.golang.org and other proxies probably already have the original cached.

Also, Retracted versions should remain available in version control repositories and on module proxies to ensure that builds that depend on them are not broken.

This answer by icza gives alternate way of sending an email to go-discovery-feedback@google.com, with the import path or module path that you want to remove might help too.