Package auditing methods
ports on FreeBSD
In FreeBSD operating system, packages are managed under ports system. The auditing command on ports is portaudit (at ports-mgmt/portaudit in the ports-tree).
- Update the vulnerability database and print a vulnerability report
for all installed packages:
# portaudit -Fda
Here, options F, d and a are to fetch the up-to-date database from FreeBSD servers, to print the creation date of the fetched database and to print the vulnerability report, respectively. - Print vulnerability report for all installed packages
without updating the vulnerability database:
$ portaudit -da
or just$ portaudit
pkgsrc on NetBSD
In NetBSD operating system, packages are managed under pkgsrc system. We note that the pkgsrc system can be used in other operating systems. The auditing command on pkgsrc is audit-packages, which is installed by default in recent version of NetBSD otherwise available by installing pkgtools/pkg_install in pkgsrc-tree.
- Update the vulnerability database:
# download-vulnerability-list
- Print vulnerability report for all installed packages:
# audit-packages
emerge on Gentoo Linux
In Gentoo Linux, packages are managed under emerge. The auditing command on the emerge package management system, is glsa-check, which is available by installing app-portage/gentoolkit.
- Update the vulnerability database:
# emerge --sync
- Print vulnerability report for all installed packages:
$ glsa-check -p affected
MacPorts on Mac OS X
In Mac OS X, packages can be managed under MacPorts, which is one of third-party applications. You can check the installed and outdated packages with an option outdated as follows.
- Print the list of outdated packages from installed ones:
# port outdated
apt on Debian/Ubuntu Linux
In Debian-family Linux (including Ubuntu), packages are managed under apt (dpkg). The outdated packages can be found by apt-get command on the apt package management system.
- Update the package tree:
# apt-get update
- Simulate upgrade; i.e., print the list of outdated packages:
# apt-get -s upgrade
- Upgrade outdated packages:
# apt-get upgrade