toplogo.png
up Home Computers Cleaning Ports
From http://craig.backfire.ca/pages/computers/ports-clean

If you want to keep the default config, you can still quickly clean out ports with this:

find /usr/ports -type d -name work -maxdepth 3 -exec rm -r {} \;

If you have sysutils/xapply installed, you can be even more elite with this:

find /usr/ports -type d -name work -maxdepth 3 | xapply -fP4 'rm -rf %1' -

The quickest way of cleaning ports is to give ports a separate build directory. To do this, put the following into the file /etc/make.conf:

WRKDIRPREFIX=/usr/obj

If that file does not exist, create it. Now, to clean ports, run the command below; it should finish in no time.

rm -rf /usr/obj/usr/ports/*

It should be noted that the WRKDIRPREFIX setting only works on port builds started after the setting was made. All old ports builds must be cleaned using one of the other methods.

Special thanks to Jordan Sissel for the elite find | xapply command.

Rate This Page

Mouse over the nuts to rate. ZERO NutsOne NutTwo NutsThree NutsFour NutsFive Nuts 

Page last modified on December 29, 2009 16:55:45. (ID=2)