Last updated:
Quick answer: open a terminal and run sudo apt update && sudo apt upgrade -y. apt update refreshes the list of available packages, and apt upgrade installs the newer versions. If you use the desktop, open Software Updater instead. This works the same on Ubuntu 26.04, 24.04 and 22.04. It updates packages inside your current release; it does not move you to a newer Ubuntu version.
There are two ways to update Ubuntu: the terminal (apt) and the graphical Software Updater. Both install the same security and bug-fix updates, so use whichever you prefer. The screenshots below come from the original version of this guide and show Ubuntu 22; the commands are unchanged on current releases. I re-checked the apt list --upgradable and apt full-upgrade behaviour on Ubuntu 24.04, but the Software Updater steps are shown only with the original screenshots.
Update vs upgrade: what each command does
| Command | What it does | When to use it |
|---|---|---|
sudo apt update | Downloads the current package lists from the repositories. Installs nothing. | Always first |
sudo apt upgrade | Installs newer versions of installed packages. Does not remove packages or install new dependencies that need changes it considers risky. | Routine updates |
sudo apt full-upgrade | Like upgrade, but may also install or remove packages to resolve changed dependencies, which new kernels sometimes require. | When upgrade reports packages “kept back” |
sudo apt autoremove | Removes packages that were installed as dependencies and are no longer needed. | After updating, to free disk space |
Method 1: Update Ubuntu from the terminal
Step 1: Refresh the package lists
sudo apt update
The command needs sudo because it changes system files. The last line of the output tells you how many packages can be upgraded.

Step 2: See what will be upgraded (optional)
apt list --upgradable
This lists each package with its new and current version, so you can see what the next step will change before you run it.
Step 3: Install the updates
sudo apt upgrade
Review the list and press Y to confirm.

To run both steps in one line, and answer yes automatically, use:
sudo apt update && sudo apt upgrade -y

The && means the upgrade only starts if the update succeeded. Avoid -y on servers where you want to read the package list before accepting it.
Upgrade a single package
To upgrade only one installed package, name it. Here nginx is the example:
sudo apt install --only-upgrade nginx
The older form sudo apt upgrade nginx from the original version of this guide also works on current releases, but --only-upgrade makes clear that nothing new will be installed if the package is missing.

Step 4: Clean up and check whether a reboot is needed
sudo apt autoremove

Kernel and some library updates only take effect after a restart. Ubuntu creates the file /var/run/reboot-required when that is the case:
ls /var/run/reboot-required
If the file exists, reboot with sudo reboot when it is convenient. If you see “No such file or directory”, no restart is pending.
Method 2: Update with Software Updater (desktop)
Search for Software Updater in the Ubuntu Desktop search box and open it:

It checks for updates and starts downloading them automatically:

When it finishes installing, it shows the message “The software on this computer is up to date”:

Update vs upgrade Ubuntu to a new release
Everything above installs updates inside your current release, for example Ubuntu 24.04 stays 24.04. Moving to a newer release (for example 24.04 to 26.04) is a different, bigger operation, normally done with do-release-upgrade and only after a full backup. Do it on a test machine first, and never on a production server without a backup and a rollback plan. I did not test a release upgrade for this article.
Troubleshooting
| Message | Meaning | What to do |
|---|---|---|
| Could not get lock /var/lib/dpkg/lock-frontend | Another update process (often the automatic updater) is running | Wait a few minutes and retry. Do not delete lock files. |
| “The following packages have been kept back” | The upgrade needs dependency changes apt upgrade will not make | Run sudo apt full-upgrade after reading the proposed changes |
| Temporary failure resolving / Failed to fetch | No network or DNS, or a repository is unreachable | Check the connection, then run sudo apt update again |
| Updates are held back on a server | Unattended updates or pinned packages | Check apt-mark showhold for held packages |
FAQ
How often should I update Ubuntu? Check at least weekly, and apply security updates as soon as they appear on any machine reachable from the internet.
Is apt update the same as apt upgrade? No. update only refreshes the package lists; upgrade installs the new versions.