(FIXED) Apt-get command not found on Mac

If you have used a Linux system before, you may be familiar with the Apt-get command. It is used to install applications or packages. macOS and Linux have some similarities, and a very small number of Linux packages can be installed on macOS. Older versions of MacOS are much more likely to be able to run a Linux application.

Can’t find the apt-get command?

The message Apt-get command not found appears when users try to install a Linux application with a command. There is nothing wrong with the apt-get command, but it doesn’t work in macOS. macOS does not have this special package manager, so it does not work.

How to fix apt-get on a Mac

This does not mean that you cannot install the Linux package on macOS. Use only another tool.


If you know Linux, you also know Homebrew. It is available for macOS and can be used to install packages.

  1. Make sure you have Xcode installed (Observe: Get it from the Mac App Store)
  2. Open the terminal and Run this command: xcode-select --install.
  3. Accept the EULA.
  4. Run this command to Install Homebrew |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  1. Confirm you want to install Homebrew.
  2. After the installation check with this command: brew -v.
  3. Now you can install packages with this command:
brew install Name_of_package

Observe: You can install Homebrew on the Windows 10 subsystem for Linux.


Macports is another package manager for macOS. It works just as well as homebrew, but in general you should choose only one of these two.

  1. Make sure you have Xcode installed. Download it from the Mac App Store.
  2. Open Terminal.
  3. Throw it Order: xcode-select --install.
  4. Confirm what you want install Xcode tools.
  5. Download Macport for your macOS version.
  6. Run the PKG file and install Macports.
  7. Install packages with this command:
port install Name_of_package


Apt-get does not work outside of Linux. You will eventually need to use another package manager. macOS is built for BSD, and BSD is similar to Linux. This is quite difficult in terms of technology, which is why the apt-get command cannot be used on MacOS. Homebrew and Macports are able to install packages as well as Apt-get. If you can’t install the package with Homebrew or Macports, or if it doesn’t work after installation, it’s probably a bug in the package itself or in other dependencies that can be fixed. Homebrew and Macports cannot make a damaged package run on macOS.

See also  How to password protect folders on a Mac

About the author


Leave a Comment