Is it safe to delete /usr?

Discussion in 'OS X Mavericks (10.9)' started by jykim0806, Jun 16, 2013.

  1. macrumors member

    Joined:
    Mar 11, 2013
    Location:
    Seattle, WA USA
    #1
    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?
     

    Attached Files:

  2. macrumors G3

    Joined:
    Jul 23, 2002
    Location:
    Sol III - Terra
  3. macrumors P6

    Intell

    Joined:
    Jan 24, 2010
    Location:
    Inside
    #3
    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.
     
  4. thread starter macrumors member

    Joined:
    Mar 11, 2013
    Location:
    Seattle, WA USA
    #4
    But /usr/local was safe to delete right?
     
  5. macrumors 65816

    w0lf

    Joined:
    Feb 16, 2013
    Location:
    USA
    #5
    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
     
  6. macrumors G3

    Joined:
    Jul 23, 2002
    Location:
    Sol III - Terra
    #6
    I don't know as I don't know what software you had installed on your computer that needed /usr/local
     
  7. thread starter macrumors member

    Joined:
    Mar 11, 2013
    Location:
    Seattle, WA USA
    #7
  8. macrumors 6502a

    Joined:
    Jun 18, 2011
    #8
    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.
     
  9. thread starter macrumors member

    Joined:
    Mar 11, 2013
    Location:
    Seattle, WA USA
    #9
    Thanks a lot!
     
  10. macrumors 68040

    SlCKB0Y

    Joined:
    Feb 25, 2012
    Location:
    Sydney, Australia
    #10
    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.
     
  11. macrumors 68020

    Joined:
    Jun 15, 2012
    #11
    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.

    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.
     
  12. macrumors 6502a

    Joined:
    Oct 4, 2008
    #12
    /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
     
  13. macrumors member

    Joined:
    Mar 1, 2010
    #13
    ....I do not understand this. Why would you need to delete /usr?? An 800MB+ folder that is hidden by default is obviously important.
     
  14. macrumors 6502a

    Joined:
    Oct 4, 2008
    #14
    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
     
  15. Moderator

    maflynn

    Staff Member

    Joined:
    May 3, 2009
    Location:
    Boston
    #15
    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.
     
  16. macrumors 68040

    SlCKB0Y

    Joined:
    Feb 25, 2012
    Location:
    Sydney, Australia
    #16
    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
     
  17. macrumors regular

    Joined:
    Mar 2, 2011
    #17
    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.
     

Share This Page