Best way to keep my system up to date with the latest ports

Hi all,

I hope this is in the correct section. I have had quite a number of issues over the past day with upgrading my box that i hadn't upgraded for around 6 months. I was wondering what is the easiest way to keep all of my packages up to date on a regular basis? i am happy to kick it off as a manual command, just want to try and stick to one way for upgrading.

i used to run the command:
Code:
portsnap fetch update && portupgrade -apPDR --batch
however over the past day i have reinstalled all of my ports and upgraded to 8.1 in the mean time with the following command:
Code:
portsnap fetch update && portmaster -a

Which way do you all use to update your system and install all the necessary ports that have upgrades available? i am happy to recompile the individual upgrades for the ports every time if thats the best way.

cheers.
 
wblock said:
Upgrading FreeBSD Ports is an article I wrote recently to try to cover the most important points of keeping ports updated. As usual, feedback is welcome.
It would be great if there's a second part of the article for lazy people like me who prefers pre-compiled binaries(packages) if available.
 
ahavatar said:
It would be great if there's a second part of the article for lazy people like me who prefers pre-compiled binaries(packages) if available.

Thanks, but I almost never use packages, so have little useful experience with them.
 
Add something like this to your crontab to keep your ports tree up to date automatically, so you don't have to wait for the download and extract while working:

Code:
# Update the Ports Tree: Weekly
0       3       *       *       6       root    /usr/sbin/portsnap cron update > /dev/null 2>&1

I also send an email with a list of ports needing updates via crontab:

Code:
# List Updated Ports: Weekly
44      4       *       *       6       root    /usr/local/sbin/portmaster -L |grep -i "new version" | mail -s "`hostname -s`: Port Update" you@yourdomain.com

I always use sysutils/screen in case I get disconnected during a lengthy upgrade process:

$ screen -S portup

Something like this will usually do the trick:

$ sudo portmaster -badH

[CTRL]-a then d will detach your screen session so you can do other stuff. To reattach, use:

$ screen -rS portup

I prefer portmaster to portupgrade. I have simply had more success with it.
 
Leave the system crontab (/etc/crontab) well alone, because system upgrades may touch/alter it. If you want root to run a job, use root's own crontab (crontab -e as the root user). This goes for all system users, btw.
 
Back
Top