What’s the best way to auto clean distfiles after using make/portupgrade in FreeBSD

freebsd-ports

I'm playing with a FreeBSD installation inside a Virtualbox vm, and I want to keep the size of the image relatively small. How can I configure FreeBSD to clean distfiles after installing a port (using make, portupgrade, etc)?

Best Answer

Sequentially:

portmaster --check-depends 
portmaster --check-port-dbdir 
portmaster -s 
portmaster -y --clean-distfiles
Related Topic