Overview
Regular updates patch security holes and fix bugs. This article shows how to update packages on the common Linux distributions you can run on ALYPOD, plus how to automate security updates so you do not fall behind.
Before you begin
- Root or sudo access to the Pod.
- A snapshot or backup before large upgrades — always prudent.
Debian and Ubuntu
bash
sudo apt update
sudo apt full-upgrade -y
sudo apt autoremove -y
apt update refreshes the package lists; full-upgrade installs newer versions and can
add/remove dependencies.
RHEL family (Rocky, AlmaLinux)
bash
sudo dnf check-update
sudo dnf -y upgrade
sudo dnf -y autoremove
Check whether a reboot is required
Kernel and core library updates need a restart to take effect:
```bash
Debian/Ubuntu
[ -f /var/run/reboot-required ] && cat /var/run/reboot-required
RHEL family
sudo dnf needs-restarting -r ```
Schedule reboots during a maintenance window.
Automate security updates
Debian/Ubuntu — enable unattended upgrades:
bash
sudo apt install -y unattended-upgrades
sudo dpkg-reconfigure -plow unattended-upgrades
RHEL family — enable dnf-automatic:
bash
sudo dnf install -y dnf-automatic
sudo systemctl enable --now dnf-automatic.timer
Upgrade to a new major release
Major version upgrades (for example Ubuntu 22.04 → 24.04) are riskier. Snapshot first, read the release notes, then:
bash
sudo do-release-upgrade # Ubuntu
For Debian, edit /etc/apt/sources.list to the new codename and run
apt update && apt full-upgrade, checking prompts carefully.
Troubleshooting
- Problem: "held back" packages. Solution: inspect with
apt list --upgradableand resolve dependency pins. - Problem: repo key expired. Solution: reimport the vendor's signing key.
- Problem: update broke an app. Solution: restore the snapshot you took before upgrading, or roll back the specific package.
Related articles
- [Initial server hardening after installation]
- [Creating and restoring snapshots]
- [Setting the timezone and configuring NTP]
