ADVERTISEMENT
ADVERTISEMENT

How to remove packages installed with go get command?

Learn to remove packages installed with the go get command.
Submitted by IncludeHelp, on November 23, 2021

When we install the packages using the go get command the source directory is saved under the $GOPATH/src and the package file is saved under the $GOPATH/pkg/<architecture> (For 64-bit Windows, $GOPATH/pkg/windows_amd64).

If you want to remove the packages installed with the go get command – we can directly delete the files/directories related to the installed package. We have to delete the source directory under $GOPATH/src and compiled package file under $GOPATH/pkg/<architecture>.

Another way – Removing using the go clean - i command

go clean -i importpath...

This command deletes the archive files and executable binaries but the source directory we have to remove manually under $GOPATH/src.

Golang FAQ »

ADVERTISEMENT




ADVERTISEMENT


Comments and Discussions!

ADVERTISEMENT

ADVERTISEMENT

ADVERTISEMENT

ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT

Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.