Can I delete /usr/ports?

I did a portsnap fetch and extract, installed all the ports I needed to install and now I feel like freeing the 1G 1 GB that my /usr/ports takes. Can I delete /usr/ports, or will I still need this directory for uninstalling or upgrading ports in the future?

Sorry if this is a trivial question, FreeBSD newbie here.
 
Yes, you're going to need it every time you build from ports. Instead of removing it completely, clean it out. Make sure there are no work directories around. Also, /usr/ports/distfiles needs regular cleaning to remove old distfiles (you can remove all files, they will be downloaded again when needed).

rm -rf /usr/ports/*/*/work
 
Unless that computer is isolated from the Internet and does not need ports updates, or the space occupied by the ports tree is really needed for something else, keep it. Updating will be quicker and easier.
 
Keeping /usr/ports clean rather than deleting it seems like a good option for me. 1 GB of drive is not the world, but I didn't want to keep something that I will not use again. Thanks for all answers and suggestions. :)
 
Back
Top