Not able to delete a file from raspbian
Hi. I have successfully finished making a smart mirror. Now I actually want a voice assistant which can be used to interact with the smart mirror. So I have decided to integrate alexapi into my smart mirror. This is the actual link from where I want to download alexapi :- (https://github.com/alexa-pi/AlexaPi/wiki/Installation)
So while I was installing this, By mistakely I have closed the terminal so again when I tried to run the script, it was unable to execute so I decided to remove the file which I have cloned earlier while downloading the alexapi. This was the repo which I have cloned :- (sudo git clone https://github.com/alexa-pi/AlexaPi.git). I have cloned this repo inside opt directory. So now my main problem is that as I have mentioned above that due to some reason I wanted to delete this file but I am unable to do so. The reason to delete the alexapi file is because I want to reinstall the alexapi. So when I again tried to clone the repo inside opt file, I am getting a error that the file you want to clone already exists and the directory is also not empty so I have decided to delete the previous alexapi file but I was not able to remove the file. I always get the error that the file was deleted with errors and again when I go back and check that is the file deleted or no, so the answer is its not deleted. When I try to remove the file it says me this error that the file was deleted with errors. I hope you understood my problem. Please help me with it.
Thanks in advance,
@biswajeet opt is protected, do u have to use sudo to become root to change it.
don’t use opt in the future
This post is deleted!
So is there any way to remove the file?
sudo rm filename
sudo rm -rf foldername
Thank you. I have successfully deleted the file. Thank you @sdetweil