Is it safe to delete /usr?

0038459

Suspended
Original poster
Mar 11, 2013
32
0
Hi, I was going through folders to clean some unused files, and I confronted this /usr folder inside Macintosh HD.
Now, I deleted /usr/local folder because it is not part of the system files and they don't come with the clean install, but I was not sure if it is safe to delete /usr as a whole. Any ideas?
 

Attachments


Intell

macrumors P6
Jan 24, 2010
18,881
368
Inside
You shouldn't delete anything in /usr, even /usr/local/. Doing so could cause major problems with your OS and cause it to not boot.
 

w0lf

macrumors 65816
Feb 16, 2013
1,233
73
USA
No it is not safe. You'll probably not be able to boot or have seriously messed up os if you delete that.

Those are system files and some how the hidden flag got removed.

Open terminal
Type

chflags hidden /usr

Press return
 

CyBeRino

macrumors 6502a
Jun 18, 2011
732
26
It is safe to remove /usr/local (though you may break third-party software) but /usr itself is absolutely vital to the OS and you will be looking at a re-install if you delete it.
 

SlCKB0Y

macrumors 68040
Feb 25, 2012
3,139
197
Sydney, Australia
but I was not sure if it is safe to delete /usr as a whole. Any ideas?
Not trying to sound like an arse, but if you have to ask this question, you probably shouldn't be doing what you are doing.

I also think you should have removed the contents of /usr/local rather than the directory itself.

A much better way to save space is to disable things like the sleepimage file (assuming you dont need it). However much RAM your Mac has is how much you'll save in diskspace. Disabling TimeMAchine from storing local backups and removal of text-to-speech voices can also save a significant amount of space.
 

benwiggy

macrumors 68020
Jun 15, 2012
2,186
15
Not trying to sound like an arse, but if you have to ask this question, you probably shouldn't be doing what you are doing.
I agree, on two fronts: firstly, going around the disk deleting any folders whose purpose you are unsure of is going to get you into trouble; and secondly: I would expect a greater degree of knowledge from someone who is beta-testing pre-release software.

A much better way to save space is to disable things like the sleepimage file (assuming you dont need it). However much RAM your Mac has is how much you'll save in diskspace. Disabling TimeMAchine from storing local backups and removal of text-to-speech voices can also save a significant amount of space.
I would advise against either of these. The sleep image is important on any laptop, and without it battery life while the lid in closed is lessened. You will lose any unsaved files when the battery runs out, too.
Similarly, local backups will get deleted if the OS needs the space for something else.
 

ScottishCaptain

macrumors 6502a
Oct 4, 2008
872
467
/usr/local is safe to delete. As is /usr/opt.

/usr is NOT safe to delete.

If you do that, you will probably render your system unbootable.

-SC
 

Embio

macrumors member
Mar 1, 2010
82
0
....I do not understand this. Why would you need to delete /usr?? An 800MB+ folder that is hidden by default is obviously important.
 

ScottishCaptain

macrumors 6502a
Oct 4, 2008
872
467
....I do not understand this. Why would you need to delete /usr?? An 800MB+ folder that is hidden by default is obviously important.
Your average Mac user does not know this, that is why those folders are hidden by default. Something on his system has somehow unhidden that folder, making it visible. Most users when presented with a similar scenario will assume that since they've never seen it before, it can probably be deleted.

-SC
 

maflynn

Moderator
Staff member
May 3, 2009
65,032
30,956
Boston
I too have to ask why do you want to delete it OP, the space is inconsequential and the risk is high when you're removing system files/folders that were installed by OSX.

Anything in the root directory, I leave alone, its not meant to be mucked with.

My only other piece f advice is to have a backup before you opt to delete anything as you may find yourself with a non-booting machine and will need to install OSX again.
 

SlCKB0Y

macrumors 68040
Feb 25, 2012
3,139
197
Sydney, Australia
I would advise against either of these. The sleep image is important on any laptop, and without it battery life while the lid in closed is lessened. You will lose any unsaved files when the battery runs out, too.
All valid points but in my instance, I have a Macbook Pro with 16GB of RAM and an SSD. I simply wasn't willing to trade 16GB of SSD space for the benefits offered by having the sleepimage. :D
 

Galaxas0

macrumors regular
Mar 2, 2011
129
78
The following folders are the only ones that should be visible in the root directory, except those you have made (this is a bad idea though): Applications, System, Library, Users, Groups (on OS X Server installs).

If it's not one of the above, IT SHOULD BE A HIDDEN FILE. NOT DELETED.