Updating and downgrading your system

With the introduction of package management you can now upgrade your system in place using the pkgman command. The update process is straightforward, requires an internet connection, and requires a single reboot. pkgman will handle obtaining the latest updates and applying them to your system.

Bleeding edge

Warning: Bleeding edge updates may occasionally fail if major ABI updates have taken place since the last update was performed. While problems are rare, having backups is recommended before updating.

Update process

To update your system to packages in the repositories, there are a few simple steps to perform.

  • All you have to do is add the current repositories (do not add single quotes around the urls, the $(getarch) is meant to be substituted by the shell):
    pkgman add https://packages.haiku-os.org/haiku/master/$(getarch)/current
    pkgman add https://packages.haiku-os.org/haikuports/master/repo/$(getarch)/current
  • Update to the latest packages:
    pkgman update
  • Reboot once complete:
    shutdown -r

Freeing some disk space

When updating, old packages are kept in directories named "state_..." in /system/packages/administrative/ to allow booting with previous states in case update fails. After a while you might want to free up some disk space. You can safely remove the oldest state folders there, as well as the "transaction-..." ones. Do not touch the other directories though.

Downgrading to a previous revision

It's possible that an update to the latest Haiku revision (hrev) introduced a regression you're not willing to live with. From the boot options menu you can load a former, working hrev (see the user guide's Boot Loader - Troubleshooting). Find the last working state and boot into it.

To permanently downgrade to this revision, you have to point the 'Haiku' and 'HaikuPorts' repositories to that hrev. You find the current revision under "About Haiku" from the Deskbar. As example, for hrev50380:

pkgman add https://packages.haiku-os.org/haiku/master/$(getarch)/r1~alpha4_pm_hrev50380
pkgman add https://packages.haiku-os.org/haikuports/master/repo/$(getarch)/by_hrev/hrev50380

With "pkgman full-sync" you can now downgrade to that hrev50380.

Note, that you're now 'stuck' with that revision. You should report the regression and help to fix it, if you can. Once fixed - watch the commit logs - you can change back to the "current" repo.