I just thought that when compiling a piece software the compiler was also shutting out some garbage files that I could remove.
In ports system, progress files and final build "product" are kept in
work subdirectory in port directory. It will not be deleted unless specified otherwise. The command is :
# make clean
. If you run it inside port directory, it'll clean that port. If you run it on whole ports tree (eg inside
/usr/ports/), it will clean everything, but it's somewhat slow. If you don't have many ports installed (let's say up to 50), the following script could be useful :
Code:
#!/bin/sh
for i in `find /usr/ports -name work -type d`
do
cd `echo "$i" | sed 's/\/[^\/]*$/\//'`
make clean
done
The source files needed for port builds are kept inside
/usr/ports/distfiles/. In case of cheap bandwidth vs expensive storage, you should periodically delete everything from that directory.
Ports tree itself has around ~ 870MB. Move it to somewhere and mount via NFS. Or compile ports on another platform-compatible computer into binary packages, copy and install. World source tree is also large (~ 700MB). In essence, perform your compilations elsewhere, so you don't need a whole build environment on-board.