Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

remove old versions from pkg.go.dev

Tags:

go

I have this Go package on GitHub. and on GitHub I've delete old version tags. but on: https://pkg.go.dev/example.com/username/pkg it still showing those old versions.

I'm wondering how to completely delete those old package from pkg.go.dev

like image 977
twiny Avatar asked Mar 02 '26 19:03

twiny


1 Answers

Go module versions are immutable: you cannot invalidate them by simply removing tags, because if you then reused those tags you would cause checksum mismatches for existing users.

Instead, you can use the retract directive in your go.mod file to warn users to avoid versions in a specific range, and to cause the go command not to add new dependencies on those versions by default.

like image 182
bcmills Avatar answered Mar 05 '26 11:03

bcmills