Quickly Update Freebsd 15.x and Over and All Jails

Published: Jul 8, 2026

Assuming you have pkgbase and 15.x FreeBSD server with a bunc of jails, here’s a single command to upgrade them in one shot. What does the command below do:

  1. Upgrades the host.
  2. Finds and upgrades all jails.
  3. Restarts jails thereafter.

Assuming you have Bastille as the Jail Manager and that the host and jails are already on pkgbase.

pkg update -f && pkg upgrade -y && ( set -e; for jail in $(bastille list jail); do echo "=== Updating $jail ==="; bastille update "$jail"; done ) && bastille pkg ALL update -f && bastille pkg ALL upgrade -y && bastille restart ALL

:hotspringsi:

[web] · [in] · [fb] · [ig] · [x] · [tt] · [yt]

Previous Post