"Opt" Folder

Can Someone Answer My Question, I Have A Folder In My Hard Drive Place In My Finder And It Is Called "Opt" I Didn't Put It There It Just Appeared There! There Isn't Anything In It When I Double Click It And When I Put It In The Trash It Won't Delete, I Was Wondering Where It Goes So I Could Put It In the Right Place And Is It Important To Your System, Thanks A Lot,
Chris!

MacBook Pro, Mac OS X (10.6.4)

Posted on Jul 18, 2010 1:28 PM

Reply
Question marked as Top-ranking reply

Posted on Jul 19, 2010 3:00 AM

Chris,

Welcome to the support forums.

In short, don't try to delete the /opt folder. As a Linux user who recently switched to OS X, I can tell you that the /opt folder is used by various programs to install libraries and the like. Every Linux/Unix system I have ever used has this folder in this exact location. Depending on the nature of the software that you use, this folder may or may not be empty.

For example, when I install Linux/Unix based software that has been ported to Mac OS X via MacPorts, various libraries for X11, BLAS, Gnuplot, METIS, etc. are installed in that folder by root (or super user or admin) and the permissions are such that the typical user can read and execute the files, but not write/delete them. This is the reason that you cannot delete this folder unless you do so as the admin. This may or may not cause some funky system issues. I would strongly recommend you leave that folder alone along with any other folder that is in the / directory for the sake of the operating system.

Furthermore, if there are files in that folder, they were put there during an installation that required you to give admin privileges via prompting you for a password.

D
7 replies
Question marked as Top-ranking reply

Jul 19, 2010 3:00 AM in response to Apple No.1 Fan

Chris,

Welcome to the support forums.

In short, don't try to delete the /opt folder. As a Linux user who recently switched to OS X, I can tell you that the /opt folder is used by various programs to install libraries and the like. Every Linux/Unix system I have ever used has this folder in this exact location. Depending on the nature of the software that you use, this folder may or may not be empty.

For example, when I install Linux/Unix based software that has been ported to Mac OS X via MacPorts, various libraries for X11, BLAS, Gnuplot, METIS, etc. are installed in that folder by root (or super user or admin) and the permissions are such that the typical user can read and execute the files, but not write/delete them. This is the reason that you cannot delete this folder unless you do so as the admin. This may or may not cause some funky system issues. I would strongly recommend you leave that folder alone along with any other folder that is in the / directory for the sake of the operating system.

Furthermore, if there are files in that folder, they were put there during an installation that required you to give admin privileges via prompting you for a password.

D

Jul 18, 2010 2:01 PM in response to Apple No.1 Fan

Hi, Chris. Your "Opt" folder is not something created by the operating system or by other Apple software, to the best of my knowledge. You or some other user of the computer, or some third-party software application, must have created it for purposes best known to them. What if any error message appears when you put it into the Trash and try to empty it? Have you tried putting it into the Trash, restarting the computer, and then emptying it?

In the future, your posts will be much easier for other people to read if you refrain from capitalizing every word.

Jul 20, 2010 7:25 AM in response to reezer

reezer: I have no experience at all with Linux or Unix systems, except in the limited sense that OS X is Unix dressed up in a friendly GUI. There is not now, nor has there ever been, an Opt folder, visible or invisible, anywhere on any of my hard drives. If such a folder had ever appeared at the root level of one of my drives, I would have been just as curious about it as Chris is. So although Linux or Unix may need that folder, OS X seems not to. Do you agree, or does this sound wrong to you?

I'm perfectly willing to accept that if Chris is running Linux or Unix on his Mac, he may need the Opt folder. You clearly know more than I do about that.

Jul 20, 2010 9:31 PM in response to eww

eww,

After looking in depth at my /opt folder, all of the files are relevant to two "sets" of software that I use.

1) One variant of a CISCO VPN Client that I used before I upgraded to SL.

2) Everything I've ever installed with MacPorts including: X11, aquaterm, emacs, ffmpeg, gcc43, gdb, gnuplot, etc.

Therefore, it is very likely that if you do not use MacPorts or that specific CISCO VPN client, you might have an empty (or even non-existent) /opt folder unless something that you have installed uses similar methods. Most Linux/Unix-"ish" software like perl, python, gcc, g++, scp, etc. is installed in /usr instead of /opt, but MacPorts installs in /opt by default. If /opt is truly empty, which you can find out by using:
du -h -d=1

inside the folder via the Terminal. It should return the size summary of:
0B .

it won't hurt anything if you delete it. If you do choose to delete it, you will most likely have to do so as root because the permissions are likely set to 755 for user(root)=rwx, group=r-x, other=r-x.

Good luck

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

"Opt" Folder

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.