Saturday, October 8, 2011

How to make clean all installed ports work directory

Use find command to search
# find /usr/ports -name work -mindepth 2 -maxdepth 3 -print0 | xargs -0 -I @ rm -Rf @

Note: this method would be a safer bet than "rm -rf /usr/ports/*/*/work" -- especially because the globbing could go over the shell argument character limit.

Do a "make clean" for all dependencies
# make clean-depends

If old or mis-set options are causing trouble,

# make rmconfig

in the relevant port directory, or (assuming that's not catching what you want) you can remove directories under /var/db/ports/.

You could refer for more make options in /usr/ports/Mk/


package command make install compile options

No comments: