Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Comments on How do I safely replace brew on Big Sur?

Post

How do I safely replace brew on Big Sur?

+5
−0

I'm still trying to solve my problem with installing Ruby on a new Mac, and some discussions are saying that I need to reinstall brew because of the change from the old chipset to the M1. (I'm just repeating what I've heard; I don't understand the issue.) I'm willing to try this, but it looks like uninstalling brew also removes everything I installed with it, and that would be bad if I can't assemble a manifest and reinstall everything after.

How do I safely replace brew?

Specifics: My new machine is an M1 Mac running Big Sur. I used Migration Assistant to move data from my previous machine, which was running Sierra. This migration carried along the old version of brew, which apparently is not the version Big Sur wants.

First question: can I get a list of "top-level" things I've installed with brew? I see that brew list shows me a long list of packages, many of which I didn't explicitly install but are presumably dependencies installed on my behalf. If I'm going to have to reinstall stuff after I uninstall and reinstall brew, I'd like to be able to figure out what I specified before I nuke anything. Or should I just save that list and feed it all to brew install after the replacement, and let duplicate dependencies and obsolete packages sort themselves out?

Second question: what else could go wrong that I should anticipate and defend against? "Back everything up" isn't the complete solution I thought it was; I recently discovered (the hard way) that Time Machine doesn't back up everything on the disk, because apparently MacOS thinks that some files should be hidden from users.

I've seen posts that recommend installing the new brew alongside the old one and then changing some paths and other environment variables, but it sounds confusing.

History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

Tried `brew leaves`? (2 comments)
Tried `brew leaves`?
Canina‭ wrote over 2 years ago · edited over 2 years ago

I don't have any OS X system to check on, but it looks like brew leaves will "List installed formulae that are not dependencies of another installed formula" whereas brew list will "List all installed formulae and casks". I'm not sure if the exclusion of casks (apparently, "Homebrew package definition that installs macOS native applications") will be a problem, but that seems like a starting point for figuring out what has been actively installed as opposed to pulled in as dependencies.

Monica Cellio‭ wrote over 2 years ago

Thank you! Yes, that's much better. I didn't know about this command, and the name (in the larger command list) didn't suggest itself to me.