PDA

View Full Version : [ubuntu] deleting folder as root



ideologo
December 18th, 2008, 03:54 AM
Trying to convert the installation file Adobe Reader .rpm to a .deb file it did not work. It create a folder that I can not delete even as root and it prevents me to retry the installation. Does anybody know how to delete a folder as root even if the folder (or directory) is not empty.
Thanks and merry christmas!):P

rzrgenesys187
December 18th, 2008, 03:56 AM
sudo rm -r directory

Replace "directory" with the name of the folder and that will get rid of it. Note "-r" removes the directories and anything contained within them recursively. BE CAREFUL, the folder doesn't go to trash

Alternately,


gksu nautilus

From the terminal or after typing Alt+F2 will open your file browser as a root and you can delete it that way, probably a bit safer.

starcannon
December 18th, 2008, 03:58 AM
prepend your rm command with sudo
or you can run nautilus as gksudo for the chore as well.
Either way be absolutely sure what your deleting.

gksu nautilus
for the rm command I'd prefer to send you to the man pages,

man rm
Please make sure you don't delete something valuable to yourself, and remember for the specific task your enquiring about you likely need to use sudo.

GL

sosaudio1
December 18th, 2008, 04:01 AM
Trying to convert the installation file Adobe Reader .rpm to a .deb file it did not work. It create a folder that I can not delete even as root and it prevents me to retry the installation. Does anybody know how to delete a folder as root even if the folder (or directory) is not empty.
Thanks and merry christmas!):P

Use this command for your directory in CLI

rm -rf whatever your directory is


BUT WORD OF CAUTION!!!!!!!! BE ABSOLUTELY SURE THAT YOU HAVE THE RIGHT DIRECTORY

PEACE

xjcannonx
December 18th, 2008, 05:05 AM
you can always relpace the rm with ls and it will show you what you are about to delete

Huszarnyi
August 14th, 2012, 07:27 PM
Using
gksu nautilus achieves the job perfectly and is much more safer than other methods, in my opinion.

dodo3773
August 14th, 2012, 07:29 PM
Using
gksu nautilus achieves the job perfectly and is much more safer than other methods, in my opinion.

This thread is almost 4 years old friend. I think they may have lost interest

Perfect Storm
August 14th, 2012, 07:31 PM
Necromancing is a forbidden art on these forums.


Thread closed.