Jan
13
2010

Keeping up with the ports – pkg_version

pkg_version -v will display some information about the version information for both currently installed ports and what you have in your ports source tree

pkg_version -l’flag’ will limit the output to certain flags, ie.
pkg_version -l ‘<’ will display all ports that are not up to date
pkg_version -l’=’ will display all up to date ports

pkg_version -c will display the required commands to upgrade all installed ports to the current version. (see below for a note on the -c option).

Putting these together you can run pkg_version -vl’<’ to check your version numbers against what’s in the ports tree to see what needs to be upgraded and pkg_version -cv’<’ to display the commands needed to upgrade your ports. Taking this one step further you could pipe the last command to a shell interpreter to do it for you. pkg_version -cv’<’ | sh does just that. N

About the Author: Urban Cetinski

Urban Cetinski :)

Leave a comment

Get Adobe Flash playerPlugin by wpburn.com wordpress themes