Score:0

How to remove a directory from root?

gr flag

I was trying to download anaconda3 on my WSL using the command sudo bash Anaconda*-*-Linux-x86_64.sh but the installation was taking a while so I decided to stop it using Ctrl+C, but later when I tried to re run the command I get:

ERROR: File or directory already exists: '/root/anaconda3' If you want to update an existing installation, use the -u option.

So I tried to run:

conda create -n asl python=3.8.8

But then I got the error: conda: command not found

then I tried to run:

sudo bash -u Anaconda*-*-Linux-x86_64.sh

But got the following error: bash: Anaconda--Linux-x86_64.sh: No such file or directory

So, I decided to remove anaconda3 using:

rm -r /root/anaconda3

rm: cannot remove '/root/anaconda3': Permission denied

Then I tried to cd into root but was getting permission denied, how can I find a work around this.

PS: I have tried to run Ubuntu as an admin and still am unable to cd into root.

Hannu avatar
ca flag
Tip: www.tdlp.org has "Bash guides", these are "old" but still provide a good amount of relevant knowledge about `bash`, the most(?) common 'command line' interface.
user1639347 avatar
gr flag
Thank you for the recommendation, will check it out
Score:2
cn flag

"Permission denied" means a different user owns it. You forgot to use sudo:

sudo rm -r /root/anaconda3
user1639347 avatar
gr flag
yes my friend you are right, thank you so much!! I am pretty new to Ubuntu still learning my way around it. I would have up voted the ans but I dont have enough reputation
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.