Update installed packages on Ubuntu
June 23, 2022 ‐ 1 min read
When you run an Ubuntu server it is good practice to regularly update the installed packages. To ensure you pull in the latest security patches. Ubuntu allows for some automatic package upgrades with the unattended-upgrades
package. But knowing to upgrade packages manually cannot hurt.
Upgrading packages on Ubuntu is done using the apt
package manager. And you most likely need sudo
permissions to run the following commands.
It is probably best to first refresh the Ubuntu package index. We do this using the apt update
command. Next we do the actual upgrading of our packages using apt upgrade
.
$ apt update
$ apt upgrade
In some exceptional cases a server reboot is required before the upgrades take effect. In the case of a Linux kernel upgrade for example.
$ reboot