Homebrew's awareness of installed packages

I’ve used Homebrew on my Macs almost since the beginning. I’ve recently started using Linux more frequently, and decided to check out Hombrew on Linux.

Here’s my question/concerns: Homebrew is unaware of packages installed by (apparently) any other means (apt, apt-get, …)

I have used brew info on several packages, some installed prior to Homebrew and others installed afterward. Homebrew seems oblivious that gcc-8 is currently installed and is willing to install the exact same version as gcc@8, and the situation is repeated for hundreds of packages (at least).

Furthermore, Homebrew reports that Ruby is not installed - unless things have changed, Ruby would have been installed when Homebrew was installed. Since Ruby was in fact available at the time Homebrew was installed, it apparently used that version, then “forgot” that it existed.

Am I missing some “Homebrew take a package inventory” step or command?

I really prefer Homebrew over the older Linux package managers, but I don’t want to end up with duplicates of many packages.

Thanks & Best Regards to Those Who Make Homebrew Possible,


This is an explicit design decision as Homebrew on Linux is designed to be as self-contained as possible, as stated in the documentation:

It can be installed in your home directory, in which case it does not use sudo . Homebrew does not use any libraries provided by your host system, except glibc and gcc if they are new enough. Homebrew can install its own current versions of glibc and gcc for older distributions of Linux.

While it is possible to run the configuration that you desire (i.e., not installing software already provided by the system package manager) with a judicious combination of brew unlink and brew install --build-from-source, it’s not recommended. I’ve personally run this configuration before, and it is incredibly frustrating to debug and remember which formulae need to be linked or unlinked.

I think Linuxbrew is designed to be more self-contained than Homebrew (which depends on system packages).

Ah Jonathan you beat me to it!