Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Which command should I run to

  • delete all old port versions
  • delete downloaded files
  • temp files created during build
  • all other stuff which I don't need when I am sure that updated version works fine

I got a suggestion to use

port clean --all all

but it tries to clean ports I don't have, though I tried

port clean --all installed

but it did not delete old inactive versions, then

port -u uninstall

but it got stuck saying that py25-nose (which is active) depends on py25-setuptools (which is inactive).

share|improve this question

2 Answers 2

up vote 47 down vote accepted

The suggestions you received cover what you're after:

port clean --all all
sudo port -f uninstall inactive

If you can't wait for the clean one to run in the background, there are a few commands you can run manually and faster.

Remove leftover build files (this is done automatically by default):

sudo rm -rf /opt/local/var/macports/build/*

Remove download files:

sudo rm -rf /opt/local/var/macports/distfiles/*

Remove archives (these aren't created by default):

sudo rm -rf /opt/local/var/macports/packages/*
share|improve this answer
    
What about deleting inactive ports taking into account problem with py25-nose which I described? –  tig Jul 20 '10 at 22:04
1  
port -f uninstall inactive –  Nerdling Jul 21 '10 at 10:42
    
Updated to add it since you're after two separate things. –  Nerdling Jul 22 '10 at 0:33
    
Thanks! When I did a macports upgrade it started downloading about 15 GiB of tex stuff I didn't want. I was panicking about how to remove the crap. Thank you! –  Wyatt8740 Jan 29 at 5:09
1  
I have 1.8 GiB of .tbz2 archives in /opt/local/var/macports/software surely they can go... according to apple.stackexchange.com/questions/64074/… they can be deleted –  Orwellophile Oct 15 at 13:05
port uninstall inactive

is the way to go.

share|improve this answer
    
Still complains about py25-nose depending on py25-setuptools –  tig Jul 20 '10 at 21:50
1  
"port -f uninstall inactive" will force this behavior to be overridden. –  Mijndert Stuij Jul 21 '10 at 6:55
2  
@tig This is a bug with the old registry format and is fixed when using the sqlite registry introduced with 1.9. The announce for 1.9.0 has instructions how to switch: lists.macosforge.org/pipermail/macports-announce/2010-June/… –  Raim Sep 5 '10 at 23:54
    
@Raim: Thank you very much! leaves pseudo name will be of a great help for me! –  tig Sep 6 '10 at 21:20

Your Answer

 
discard

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.