Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

timelessbeing

macrumors 6502
Original poster
Oct 15, 2009
447
131
Backstory: I'm having too many issues with compiling stuff and finding dependencies. I think it all stemmed from migrating data to my new Mac, and homebrew changing directories etc.

Bottom line: I want to nuke all of Homebrew, Apple Command Line Tools, and all the command line stuff I've installed .... programs, packages, frameworks, libraries, everything. Just nuke it all and fresh reinstall from scratch and start again.

My question:
The first two are fairly straightforward. I'm just wondering if it's safe to nuke the whole /user/local directory? Or is there stuff that needs to be in there, that came with the OS, or that can't be replaced?
What else can I clear out?

Thanks.
 

f54da

macrumors 6502a
Dec 22, 2021
505
186
Modern Homebrew puts everything in /opt/Homebrew so you can just nuke that. If you have an old installation, then it's not safe to nuke /usr/local since it includes non homebrew stuff as well. You could remove /usr/local/Cellar and then find all dead symlinks though.
 

broly

Suspended
Apr 1, 2020
64
13
edmonton
**** like aws can install into /usr/local by default. not sure about other applications, but it used to be a thing. FSL does as well, but you probably don't know what that is (most mac consumers not carrying the weight of the non-vocal, non-A/V-designated/dependent 1% of the user base that are, as mitt calls them, the "JAB [and wealth] CREATORS")

but you're right to question the statement, as the -isysroot flag on clang now captures the ol' -I/usr/include

anyways you're a homebrew user. you deserve what you get. i won't help you.

ta ta
 

timelessbeing

macrumors 6502
Original poster
Oct 15, 2009
447
131
Amazon Web Service? FSL?

you're talking about stuff I would have installed myself right?

I'm not crazy about HB but it's the best we've got
 

broly

Suspended
Apr 1, 2020
64
13
edmonton
AWS command line tools installs into /usr/local.

anyways, usually it's stuff you have installed by default but i strongly discourage you from indiscriminately nuking /usr/local.

both crapalina and brohave have /usr/local/nvram entries, which i would not want to delete (this is probably some kind of I/O pipe/redirect that the O/S uses).

if you want to clean install brew and command line tools, first remove brew using this:


then uninstall command line tools:


then install macports for a robust and proper package management offering that sits in /opt/local and won't ever raise concerns about indiscriminate nuking and re-installing.

then again people use package managers like apps on their phone and think they need more than macports offers, which leads them to fink--that's what they used to call it. now it's called homebrew.
  • first named after dishonesty, now alcohol. probably will rebrand again after it dies out, just as fink did with a similarly-captured proportion of the userbase.

anyways, i can't talk to people who use appul silicon because they actually think it's good.

they don't want to accept the fact that APPUL forced cinebench to change their benchmarking scheme (to running the SAME scene multiple times, therefore increasing the number of cache hits) to make it look good, as it was getting walloped on the original (that ran 'different scenes').
 

f54da

macrumors 6502a
Dec 22, 2021
505
186
As an example, PlistBuddy (which afaik comes with osx) lives in /usr/local/bin. Additionally /usr/local/bin is conventionally where 3rd party (non homebrew managed) software might dump binaries they want to be in $PATH, so nuking it might also remove random cli tools you installed outside homebrew. Hence why I believe the safest option is to delete /usr/local/Cellar and then find all broken symlinks in /usr/local/.

Fwiw newer versions of homebrew use /opt instead to make things more hygenic (it's also required on m1 iirc).
 

timelessbeing

macrumors 6502
Original poster
Oct 15, 2009
447
131
AWS command line tools installs into /usr/local.

again what is that? Amazon? I don't use it.

anyways, usually it's stuff you have installed by default but i strongly discourage you from indiscriminately nuking /usr/local.

Already did days ago (have a backup just in case).
No issues so far.


both crapalina and brohave have /usr/local/nvram entries, which i would not want to delete (this is probably some kind of I/O pipe/redirect that the O/S uses).

nvram is in usr/bin where I would expect it to be.

if you want to clean install brew and command line tools, first remove brew using this

Those are trivial , as I said in my original question. I wasn't really asking about those

then install macports for a robust and proper package management offering that sits in /opt/local and won't ever raise concerns about indiscriminate nuking and re-installing.
aarch64 HB lives in /opt. I think this issue came up because of the combination of migration and switch to ARM architecture.
Not really the fault of HB, and I'm not convinced the same wouldn't happen with MP.


Anyway this isn't a HB vs. MP thread. Not going there. I have no reason to switch.
Apple Silicon is night and day difference from the old space heater intel. Anyway, that is again completely irrelevant.
 

chrfr

macrumors G5
Jul 11, 2009
13,734
7,310
As an example, PlistBuddy (which afaik comes with osx) lives in /usr/local/bin.
Apple doesn’t install anything into /usr/local by default- a clean install of macOS has nothing at all in /usr/local. Plistbuddy is at /usr/libexec/Plistbuddy.
 
  • Like
Reactions: timelessbeing

timelessbeing

macrumors 6502
Original poster
Oct 15, 2009
447
131
/usr/local/bin is conventionally where 3rd party (non homebrew managed) software might dump binaries they want to be in $PATH, so nuking it might also remove random cli tools you installed outside homebrew.

My question DOES say that I'm trying to nuke everything.
I want to nuke .... all the command line stuff I've installed... Just nuke it all and fresh reinstall from scratch and start again.
 

chown33

Moderator
Staff member
Aug 9, 2009
11,006
8,905
A sea of green
You could just rename /usr/local/bin to something else, then make a new dir there and repopulate it. You may need 'sudo' for these.

Aftewards, you could do a differential compare between the dirs to see what's different.
 
  • Like
Reactions: timelessbeing

timelessbeing

macrumors 6502
Original poster
Oct 15, 2009
447
131
Essentially that's what I've done.
Except, I didn't rename it. I dumped a directory listing, backed up, and deleted /usr/local/bin
Now I'm going through the list and installing what I need. A lot of it was junk.
 

dmccloud

macrumors 68040
Sep 7, 2009
3,164
1,915
Anchorage, AK
The easiest way to accomplish what you want to achieve without potentially causing more headaches would be just to do a clean install of the OS and set up from factory rather than trying to retroactively remove what is already installed. You have created more work for yourself by choosing to nuke the directory and start over within an existing OS build.
 
  • Like
Reactions: Basic75

timelessbeing

macrumors 6502
Original poster
Oct 15, 2009
447
131
The easiest way to accomplish what you want to achieve without potentially causing more headaches would be just to do a clean install of the OS and set up from factory rather than trying to retroactively remove what is already installed. You have created more work for yourself by choosing to nuke the directory and start over within an existing OS build.
nope it was a total success and much less work than reinstalling OS
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.