HOWTO: Check for Port Updates

Here are a couple of ways to check for Ports with new updates available using commands in a terminal. The first method uses portsdb and portversion which can be installed from ports-mgmt/portupgrade (my preferred method) and the second uses portmaster (ports-mgmt/portmaster).

To install portsdb and portversion:
Code:
# cd /usr/ports/ports-mgmt/portupgrade && make install clean
To install portmaster:
Code:
# cd /usr/ports/ports-mgmt/portmaster && make install clean
Using portversion:

1. Update the Ports tree:
Code:
# portsnap fetch update
2. Update the Ports database:
Code:
# portsdb -Uu
3. List all available updates
Code:
# portversion -vl "<"
Using portmaster:

1. Update the Ports tree:
Code:
# portsnap fetch update
2. List all available updates:
Code:
# portmaster -L | grep -i "new version"
 
I have this in my crontab. Very useful, because I get a daily email if there is a need for an upgrade:

Code:
0 3 * * * root portsnap -I cron update && pkg version -vIL=
 
Keep in mind that there's likely always something to update as the ports tree is in constant motion. The daily periodic(8) security check includes the output from pkg-audit(8), for example:
Code:
Checking for packages with security vulnerabilities:
freetype2-2.5.3_2
mutt-1.5.23_6
Unless you run into some other bug it should be enough to only update when there's a vulnerability.
 
Certainly. But some people (think upper management and the like) don't like any updates because it endangers the 'status quo'. Doing updates because there's a real need while keeping most at the same level or working state is just good system administration, in my opinion. Security vulnerabilities should at least be the minimalist requirement to update.
 
Back
Top