tagg.im / MacPorts equivalent of apt-get autoremove http://tagg.im/thread/130/macports-equivalent-of-apt-get-autoremove 2011-11-30T17:54:31Z Dolph MacPorts equivalent of apt-get autoremove http://tagg.im/thread/130/macports-equivalent-of-apt-get-autoremove#240 Dolph 2011-03-13T19:36:56Z I recently installed gedit via macports (sudo port install gedit) which installed about 100 other unrequested packages as dependents (including things like X11, GTK, and aspell - stuff I definitely don't need in OS X). Later I ran sudo port uninstall gedit, which worked great, but left all the other packages on my system. After attempting to run sudo port autoremove and sudo port autoclean (neither of which exist), I finally found the answer... and it's not very elegant. I first found the command sudo port uninstall inactive which, as the documentation reads, is the solution. In my case, it's not. You might want to try it though. I found that MacPorts refers to packages which were "installed ports that are unrequested and have no dependents" as leaves. Once you wrap your head around that, take note that many leaves may be dependent on other packages which were "unrequested." So, once you uninstall all your leaves, you'll have a whole new set of leaves. MacPorts doesn't seem to have a method to handle this recursion, so you have to iterate over your remaining leaves until there are none left. Long story short, run this over and over again until it stops uninstalling packages: sudo port uninstall leaves I miss apt-get. Re: MacPorts equivalent of apt-get autoremove http://tagg.im/thread/130/macports-equivalent-of-apt-get-autoremove#250 Anonymous 2011-11-30T17:54:31Z brew is an awesome alternative to macports :D mxcl.github.com/homebrew Re: MacPorts equivalent of apt-get autoremove http://tagg.im/thread/130/macports-equivalent-of-apt-get-autoremove#241 Anonymous 2011-04-18T21:10:59Z thanks, great text, you help me with the same problem!