I accidentally published a package to go.dev website, can anyone tell me how to delete it?
https://pkg.go.dev/github.com/Nksama/Random-quotes
Published modules cannot be deleted but can be retracted. A retracted version still exists and can be downloaded (so builds that depend on it won't break), but the go command won’t select it automatically when resolving. More info here.
To retract you will have to add retract directive to your go.mod. For example
retract v1.0.0
retract [v1.0.0, v1.9.9]
retract (
v1.0.0
[v1.0.0, v1.9.9]
)
Please Note :
The retract directive was added in Go 1.16. Go 1.15 and lower will report an error if a retract directive is written in the main module's go.mod file and will ignore retract directives in go.mod files of dependencies.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With