# renew ports tree



## nedry (May 18, 2017)

Hi, 
How do I remove the entire ports tree so I can re download the entire ports image?
Thanks 
nedry


----------



## ShelLuser (May 18, 2017)

nedry said:


> Hi how do i remove the entire ports tree so i can re download the entire ports image?


Why would you want to do that? Even so... Basically all it takes is to empty (/ remove) /usr/ports. After that you can use portsnap(8) to grab a new copy. Another option is to simply run `# portsnap fetch extract`, this will fetch (download) and install (extract) the new copy.

Of course... the latter won't clean up any stale files.


----------



## nedry (May 18, 2017)

Just that some src ports have gone missing, and a `portsnap fetch` and a `portsnap update` don't get it back.


----------



## SirDice (May 18, 2017)

nedry said:


> Hi how do i remove the entire ports tree


`rm -rf /usr/ports/*`


----------



## ShelLuser (May 18, 2017)

nedry said:


> Just that some src ports have gone missing, and a `portsnap fetch` and a `portsnap update` don't get it back.


Apart from what SirDice said also keep /usr/ports/CHANGES as well as /usr/ports/UPDATING in mind. Sometimes things can change, and if ports were removed then re-installing the ports collection won't bring them back.


----------

