up Home     · Computers     · Cleaning Ports
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.

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

Computers Autos Bikes Projects Sailing Stuff
Cleaning Ports Character List Disks and Filesystems Favourites Filesystem Tools Gigabit Home DNS OpenVPN Active Directory Authentication Making a UFS DVD
Rate: ZERO out of FiveOne out of FiveTwo out of FiveThree out of FiveFour out of FiveFive out of Five 
Home · Site Map · Random Page · Contact Me · About the Site