golang.org/x/mod/modfile.WorkFile.DropReplace (method)
one use
golang.org/x/mod/modfile (current package)
work.go#L300: func (f *WorkFile) DropReplace(oldPath, oldVers string) error {
The pages are generated with Golds v0.8.7. (GOOS=linux GOARCH=amd64)