Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Over the course of uninstalling the HP/palm enyo SDK and installing node JS I somehow goofed up something (I think my path).

Now when I try use apt-get I get the following:

-bash: apt-get: command not found

I'm not really sure how to fix this. Here is my $PATH


Using OSX Lion but problem was persistent with Snow Leopard

share|improve this question
Did you use MacPorts or Fink to get apt-get on your Lion box? Fink doesn't support Lion yet. – Wesley Aug 10 '11 at 2:39
I didnt use either. I installed macports to try and fix the issue but to no avail. – wesbos Aug 10 '11 at 2:41
Perhaps we should back up a bit. How did you get apt on your Mac in the first place since it's not shipped with OS X? – Wesley Aug 10 '11 at 2:44
:| I'm not sure. Does it come with xcode? I've always just had it.. – wesbos Aug 10 '11 at 2:45
up vote 5 down vote accepted

The tool apt-get is not a part of the Apple OSX family of products, and as such should not be expected to be found on a typical installation. One can, however, install apt, as a front-end for dpkg, using MacPorts. How useful, or advisable this would actually be is left as an exercise to the reader. To install said packages, one should perform the following command sequence.

/opt/local/bin/port selfupdate
/opt/local/bin/port install dpkg
/opt/local/bin/port install apt

After this, you're on your own....

share|improve this answer

I don't like macports.. I prefer homebrew

share|improve this answer

Try to find the executable. The symlink may have been lost

    locate apt-get


    find / -name apt-get

You can then restore the symlink if it's found with

    ln -s /path/to/apt-get /usr/bin/apt-get
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.