Go to file
Solene Rapenne e0083083be use uname -p instead of machine
on some archictures such as arm64, you have a different platform than
machine name like arm64 vs aarch64

reported by Aaron Riekenberg
2022-06-26 09:27:48 +02:00
LICENSE init 2021-08-15 20:58:08 +02:00
Makefile add makefile to ease installation 2022-03-15 10:24:33 +01:00
README.md README: mention the Makefile installation 2022-03-15 10:25:27 +01:00
pkgupdate use uname -p instead of machine 2022-06-26 09:27:48 +02:00



pkgupdate is a simple shell script meant for OpenBSD users to easily keep their packages up to date the fastest possible.

It is meant to be run daily by cron on servers on at boot time for workstations.


pkgupdate has only one flag -q to hide successful messages, preventing to send an email from cron scripts if it worked.


pkgupdate uses 3 tricks to speed up the process, this is particularily important for workstations updating during the boot process:

  • fetch the index of packages and compare it between runs (using a cache in /var/cache/pkgupdate/)
  • if the index changed, which mean everytime a new package is updated, then it only try to update the packages available in the packages-stable directory
  • if curl is installed, use curl instead of ftp(1) command (because pkg_add is more efficient with curl)


This tool is based on solene@ previous work faster packages updates and pkg_add performance analysis.

In my opinion, workstations should be updated as soon as possible, at boot time, to update packages at boot before using anything from the user session, avoiding a boring reboot.

As for servers, making the process faster is always welcome.


First, use git clone https://tildegit.org/solene/pkgupdate.git and run make install as root to install /usr/local/bin/pkgupdate.

Best way to manage this is to use root's crontab. As root, type crontab -e to edit its tab.

# for updating on boot
@reboot /usr/local/bin/pkgupdate

# for updating every hour
@hourly /usr/local/bin/pkgupdate

# for updating every 6 hours
0 */6 * * * /usr/local/bin/pkgupdate