Introduction
It is a best practice to update your server on a regular schedule for security and stability. Use this guide to keep your Arch server updated. This guide applies to any recent version of Arch Linux. Always make a backup before updating your system.
1. Research the Upgrade
Visit the Arch Linux homepage, to see if there have been any breaking changes to packages that you have installed recently. If there are, there may be manual intervention required after the upgrade.
2. Update Respoitories
This will update the package databases for each of the repositories on your system.
$ sudo pacman --sync --refresh
3. Update PGP Keys
Update the local database of PGP keys used by the package maintainers. This step is optional, but may prevent problems later on with the upgrade if the database has not been updated for some time.
$ sudo pacman --sync --needed archlinux-keyring
4. Update the System
Upgrade all system packages. Be sure to note the upgraded packages and any output that requires your attention during the upgrade process.
$ sudo pacman --sync --sysupgrade
📝 Note: if you wish to perform the entire upgrade with one command, you can combine the previous steps:
$ sudo pacman --sync --refresh --sysupgrade
5. Reboot the System
$ sudo reboot
Conclusion
Periodic updates keep your server secure and stable. Make sure you have a snapshot or backup strategy in place before updating.