File:  [NetBSD Developer Wiki] / wikisrc / pkgsrc / how_to_clean_all_pkgsrc_work_directories.mdwn
Revision 1.1: download - view: text, annotated - select for diffs
Sun Nov 20 20:28:27 2011 UTC (11 years, 10 months ago) by mspo
Branches: MAIN
CVS tags: HEAD
import a bunch of pkgsrc articles from the old pkgsrc.se wiki

    1: When working with pkgsrc, pkgsrc leaves working directories called work in the application directory. If you invoke the build with clean, then this directory is cleaned, but not the working directories of the dependencies. To avoid this problem, you should set [[DISTDIR|pkgsrc/How to use pkgsrc]] and [[WRKOBJDIR|pkgsrc/How to use pkgsrc]] in mk.conf.
    2: 
    3:     # make install clean
    4: 
    5: If you want to clean the directories of the dependencies aswell you have to run:
    6: 
    7:     # make install clean clean-depends
    8: 
    9: Either way, sometimes it is not possible or wanted to clean the working directories. You can clean them all using this one line shell command:
   10: 
   11:     # find /usr/pkgsrc -name work -exec rm -r {} \;
   12: 
   13: or this one (it is a bit longer but works much faster in most cases):
   14: 
   15:     # find /usr/pkgsrc -maxdepth 3 -mindepth 3 -name work -print0 | xargs -0 rm -r
   16: 
   17: You can also change the place where the work directories are created by setting WORKOBJDIR in /etc/mk.conf. However, the above command will still be useful, as symlinks to the actual work directory are created during the build process.
   18: 
   19: You can clean them using make clean in the parent directory, but this is not advised. It takes a very long time. Using pkgclean is another option.
   20: #See also
   21: 
   22: * [[pkgsrc/How to use pkgsrc]]
   23: * [[basics/rm]]
   24: * [[bascis/find]]

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb