Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I give myself permission to delete a folder from "file system/opt"? Folder owner is root. I am the only user of this computer but I did not install the OS. I am not much of a tech person but can follow instructions.

share|improve this question

First: do you really need to delete it?

Second: I would not recommend to use sudo. Instead I think it's better to always use gksudo. Why?:

You should never use normal sudo to start graphical applications as root. You should use gksudo (kdesudo on Kubuntu) to run such programs. gksudo sets HOME=~root, and copies .Xauthority to a tmp directory. This prevents files in your home directory becoming owned by root.

More info: What is the difference between “gksudo nautilus” and “sudo nautilus”?

You can open a terminal,and type:

gksudo nautilus

Press Enter and a new window will open. Now you can delete anything, included things that you should not delete!

share|improve this answer
The information mentioned is true and correct (Instead of sudo using gksudo) – Gaurav Jul 6 '13 at 10:30

You can do

sudo chown <username>:<username> /opt

but I probably will cause the system to not work correctly

share|improve this answer

it is not recommended to give yourself a permissions on the opt folder, this sometimes cause a security problems, so if you want to edit a file in the folder just run:

sudo nautilus

and edit the file ! :) thanks.

share|improve this answer

Issue the following in Terminal:

sudo rm /opt/name-of_folder_or_file

will immediately delete the named file or folder. Exercise this command with caution.

share|improve this answer

Press ALT-F2, then type: sudo rm -rv /opt/INSERT-FOLDERNAME-HERE

This only works if you have sudo permission. (You must be an Administrator user)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.