Homebrew, or the short version being brew is the most popular package manager for macOS. And, if you don’t know already, package managers are software tools used for managing apps on our local machines, including keeping track of versions, configuring, updating and removing them. Today we are going to learn on how to properly uninstall unused packages and all its dependencies.
Step 1. List currently installed packages via Homebrew.
Step 2. List the package dependencies.
brew deps <package_name>
Step 3. Uninstall the unused package.
brew uninstall <package_name>
Step 4. Verify.
brew list | grep <package_name>
Step 5. Remove all unused dependencies.