These are some notes for updating and upgrading OpenBSD machines just in case I need them. I will make sure to update this as often as possible and provide the reference articles. Along with man pages.

If there are other posts I create for unconventional update methods. I’ll provide those in the references.

To the point. This post discusses updating the following.

  • Base operating system
  • System packages

Any additions I’ve missed? Say the word.

Reminder: All commands in this post will need to be executed as super user or root.

Update Base System Using syspatch(8)

This command is used to fetch, verify, and install patches/updates to the base system. It will do all of this when it finds missing patches. Once it applies the new patches. Rebooting will load the new kernel with it’s newness.

One thing to note is this command only runs on release versions of OpenBSD. It will not run on current.

syspatch

To list available patches that need to be applied. The -c flag can be used.

syspatch -c

To revert the most recent installed patch. The following command can be used.

syspatch -r

Update Installed Packages Using pkg_add(1)

The pkg_add(1) command is used to install packages and their depenencies. Another capability that it has is updating the installed packages on the system.

The -u flag is used to update the installed packages and their dependencies. It will update all packages on the system if one isn’t specified.

pkg_add -u

To update only one installed package. It’s name can be specified.

pkg_add -u <package_name>

One thing that is worth noting when updating packages on OpenBSD systems. When updated there may be some instructions listed when/after the package has been updated. Please review these to make sure it doesn’t break your app configuration.

Reference