Note to self: Never run “sudo port upgrade all” again

“Ghee whiz… That was taking mighty long” I thought, “Why has my PowerBook been compiling and compiling for over 30 hours now?”

Then I remembered the command I entered to upgrade all installed MacPorts. I should have used installed instead of all. *Sigh!* I’ve just deleted my entire MacPorts install because I think it’s easier for me to actually just reinstall the few MacPorts I use.

MacPorts is a toolset for Mac OSX which allows you to get loads of unix tools ready and ported for the Mac OSX operating system. It’s a bit geeky, but it sure beats having to install everything by hand and hope you didn’t miss a mac specific patch.

27 Replies to “Note to self: Never run “sudo port upgrade all” again”

  1. thanks for dropping this note… didn’t find this suggestion anywhere else, surely I didn’t look at the right place.

  2. Actually “sudo port upgrade outdated” is even more precise. Also before running such commands, don’t forget “sudo port selfupdate” as well. Else you won’t have the latest information available to the port command.

  3. hahahhah, I’ve just hit CTRL+C and then googlized “sudo port upgrade all”. The terminal was installing aspell, considering that the installation is in alphabetical order I’ve had a better luck. 😀

  4. I googled “sudo port upgrade all” just to see if I was the only person stupid enough to do this. I think there should be a warning; who actually intends to run this command?

  5. Seriously, thanks for this post. I started my upgrade all two days ago and was looking at it — “why the heck is it upgrading openMotif????”. That answers it.

    Yuck. Now /opt uses 6GB. Guess I’ll have to blow mine away, too :(.

  6. Yeah, I just googled this after more than 24 hours compiling… stopped my MacBook at apache2.

    There should be some sort of “are you sure” when doing port upgrade all…

  7. haha, I just started this too, and it began with ‘fetching libsdl’, and I was like – uhm…? – I had a feeling of what was about to happen, so I ctrl-c:ed and googled the line. sure enough 🙂

    Macports are a nice initiative on OSX, but it sure has a loooong way to go to par up with apt-get on debian.

  8. Ouch – here we are at the end of March 2008, and I was almost the latest casualty of this one! I just hit Ctrl-C faster than you could say “sudo port upgrade outdated” !

  9. I just got done with 4 hours of “upgrading” before I got suspicious and found your page… they should really put a big fat warning when you type that!

    I was on “bison” before I canceled. I’m glad I heard the computer fan spin up in the middle of the night, or it would have been going all week!

  10. Well! Looks like MacPorts hasn’t changed anything yet! I just ran the command and stopped at qt4-mac.

    My computer was freaking out. Thank god I googled this and stopped it while I could.

  11. Grah. I did it too. I let it go for about an hour before I realized it was “upgrading” some packages I hadn’t installed.

  12. If you did this, and it’s sucking tons of disk space, how do you ‘blow away’ your mac ports install and start over? Is there a simple command, or a directory you remove?

    I totally agree about the error message btw. We don’t want to become windows, but this is such an easy mistake to make, and totally not what anyone except a developer would really want to do.

  13. Nobody in this thread should feel bad about doing this.

    I just did it, too.

    To port that statement into perspective, I have been working with UNIX and UNIX-like systems since late 1987, and UNIX system administration has been part of my job since early 1997. This is NOT a newb error, this is the result of a design flaw. Which is probably why I stopped on “2Pong”, three minutes in. 🙂

    Oh well, I still love mac ports.

  14. Heh, glad to see I’m not the first to make this mistake :/

    I’m hoping that ditching /opt/local and restoring a Time Machine backup will sort it out.

  15. Did we all come from fink-land, where that kind of command made more sense? Who would ever want to run a command that installed anything and everything in the repository using “upgrade” if it wasn’t already explicitly installed? Shouldn’t that be

    sudo port install all

    instead of

    sudo port upgrade all

    Good grief! PS – I was on abiword, but it probably was installing a bunch of dependencies that I certainly don’t want. What a mess.

  16. I did that just now, let it go for a few hours, 7.2 GB. The processor hit 90 C before I realized something was very wrong. Feeling pretty stupid right now. Ugh, apt-get, you have lead me astray with your sensible interface…

  17. One more…
    They should really have done something about this since the original post here in september 2006 – that’s two and a half years…
    Of course “upgrade” should only mean to actually upgrade what has already been installed.
    Oh well, uninstall installed and start over.

Comments are closed.