Hello everyone,
I want to upgrade my go to the latest version. But before installing the new version I must delete the existing one. My OS is Ubuntu 18.04. So I run rm -rf /usr/local/go
but the answer I get is: rm: cannot remove 'go': Permission denied
.
I have changed the directory permissions with sudo chmod -R 777 go
, but the result is the same.
What do you recommend?
Thanks
NobbZ
(Norbert Melzer)
June 25, 2020, 8:47am
2
Remove using sudo
.
But only if you are really sure that the folder is not “owned” by a package you installed.
How can /usr/local/go/
folder be owned by a installed package?
NobbZ
(Norbert Melzer)
June 25, 2020, 8:55am
4
If you did apt-get install foo
and it therefore installed a package that contained that folder.
Not owned in the filesystem sense of it, but “owned” in the context of your package manager.
As far as I can remember, I installed go by downloading the archive and extracting it into /usr/local/
folder.
NobbZ
(Norbert Melzer)
June 25, 2020, 9:01am
6
Then it should be safe to remove it, without confusing your package managers database.
As far as I remember thats even the proposed location of the installation guide on golang.org . I’m not a huge fan of that practice.
j-forster
(Johann Forster)
June 25, 2020, 11:23am
8
What would you recommend?
NobbZ
(Norbert Melzer)
June 25, 2020, 11:42am
9
Using properly packaged software or install in the users home.
1 Like
system
(system)
Closed
September 23, 2020, 11:42am
10
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.