ubuntu update all packages

Ubuntu’s package management is top-notch. Aside from the extensive package selection, one of the main reasons for this is how convenient the maintenance is.

You can update all the packages together at the click of a button, and you can do this graphically, or using CLI tools as you prefer. We’ll explain the steps for both methods in this article.

In some cases, a few packages might be held back due to phased updates. We’ll cover how you can resolve this issue as well.

Update Packages with Software Updater

The Software Updater (also called update-manager) is a frontend to APT, the standard package management tool in Ubuntu. If you’re new to Ubuntu, this tool will likely be the easiest way to keep your system updated

  1. Search and open ‘Software Updater’ from the Activities overview.
    software updater ubuntu
  2. After it checks for updates, click on Install now to install the selected updates.
    install package updates ubuntu
  3. Restart the system when prompted to finish installing the updates.
    ubuntu software updater restart

Use apt to Update Packages

Updating packages from the command line is very easy too. Unlike the GUI method, you have to perform each step manually which can help you understand what’s going on better. 

Update Package Index

Your sources lists (/etc/apt/sources.list and /etc/apt/sources.list.d) define which repositories you can download packages from. Updating the APT package index syncs your system with the latest changes made in these repos, meaning you’ll have access to the latest packages.

sudo apt update

Upgrade Packages

After updating the package index, use the upgrade command to download and install the updates.

sudo apt upgrade 

Update All Snaps

If you’ve installed any packages from the snap store, you don’t need to worry about updating them as snaps auto-update. Specifically, the snapd daemon refreshes (checks for updates) 4 times a day, which is more than enough for most users. But if you want to urgently perform a manual update anyway, you can use

sudo snap refresh 

Manually Update Held-Back Packages

Ubuntu usually rolls out updates in stages, meaning an update is initially only released to a certain amount of users. After observing the stability of the release for a while, the update is provided to more users, and so on. This process is known as Phased updates.

If you use the Software Updater to update packages, you won’t really notice this as the updater won’t notify you of held-back packages to start with.

But if you directly use apt, you’ll notice a message stating that some packages have been held back. Since this is intended, the best thing to do is to just ignore it. The packages will be updatable in a few days.  

If you want to immediately update, you can install the held-back packages manually. 

sudo apt install --only-upgrade packagename

In case there are a lot of packages to install, you can use the following one-liner to automate the process.

for i in $(apt list --upgradable | cut -d '/' -f 1,1); do sudo apt-get install $i -y ; done
Anup Thapa

Senior Writer

Anup Thapa is a Linux enthusiast with an extensive background in computer hardware and networking. His goal is to effectively communicate technical concepts in a simplified form understandable by new Linux users. To this end, he mainly writes beginner-friendly tutorials and troubleshooting guides. Outside of work, he enjoys reading up on a range of topics, traveling, working out, and MOBAs.