Keeping your Ubuntu install up-to-date isn’t difficult, even from the command line – but if you install packages from a slew of sources you often end up typing out a shopping list of commands to stay on top of things.

Which is where the Topgrade utility comes in. It lets you run a single command to update software from multiple sources, in one fell swoop.

Topgrade is not new, having debuted around 7 years ago (the original effort was archived in 2022 but a fork continues developed). I hadn’t heard of it; I saw a reader mention it in the comments of a recent article—thanks btw!—and felt it deserving of a spotlight.

What does Topgrade do?

Topgrade updating DEBs, Snaps, Flatpak, pipx and more

A command-line tool written in Rust (because of course), Topgrade detects the package managers and updatable sources you use on your system, and then runs the correct commands to update the each time you run topgrade.

It manages APT sources, Snaps, and Flatpaks as standard, but developers will appreciate it can go beyond those common sources to also refresh and update a lot more besides, including:

  • Cargo, Pip(x), NPM, Nix and Gem packages
  • Vim, Neovim, and Emacs plugins
  • JetBrains & VSCode/ium extensions
  • Git repos (if configured)
  • Homebrew/Linuxbrew
  • GNOME Extensions & Cinnamon Spices
  • ClamAV database
  • wsl, winget & Chocolatey (Windows)
  • Firmware (via fwupdmgr in view-only mode)

Plus a whole lot more.

You install it, open a terminal, type topgrade, and it does its thing. A one-stop-shop – but you customise and fine-tune its behaviour (I’ll get to that in a second).

Install Topgrade on Ubuntu

You can install Topgrade on Ubuntu in two main ways (not counting building from source): Cargo or a DEB package which is available for Ubuntu (and related Linux distributions, such as Linux Mint) on the project’s GitHub Releases page.

Using the Topgrade DEB saves any undue hassle. All necessary dependencies get fetched and installed for you, and the tool will integrate cleanly with your system’s PATH, and make it easy to uninstall at a later date (sudo apt remove topgrade).

Using DEBs from outside the Ubuntu repos is generally frowned up on. Yet, a lot of software is provided this way. This tool is open source, so the code can be checked at any time (no issues have been reported prior — this is not a new app).

Download the appropriate package from Github, then proceed install by double-clicking it and using App Center, or run this command (in the same directory as the DEB):

sudo apt install ./topgrade*.deb

Once done, you can open a Terminal and run topgrade.

However, the first time you use it run topgrade -n instead:

Terminal app on Ubuntu desktop shows the output of the topgrade -n command, listing various package manager sources being checked.
Use the –dryrun mode to check what it will do first

This performs a ‘dry run’, listing what actions/sources it would update from but without, y’know, actually updating anything you may not want.

There are other commands too. For a comprehensive overview of everything Topgrade can do, run topgrade --help.

To fully automate all upgrades (i.e., automatically agree/say yes to any package changes each source proposes), run topgrade -y and enter your password.

If you only wish update a specific source(s) or run them in a specific order, for example snap and Flatpak, use topgrade --only snap flatpak . To skip a specific source(s) but update all the rest you’d run topgrade --disable snap – this would be one-time only.

Fine-Tuning Your Upgrades

If you want to control which software sources and formats Topgrade manages every time you run the single command, without passing flags, edit the ~/.config/topgrade.toml text file. Here you can also add/control how source(s) like git repos are handled.

To exclude a source, for example exclude Flatpak, you’d add disable = ["flatpak"], and then save the file – always remember to save.

More customisation options are available, and the config file lists most of them.

You can add your own custom shell commands to run before or after the main process itself. For power users this open up a lot of possibilities, like letting you update a remote system(s) over SSH whenever you run it the command locally.

Topgrade is useful, but not essential

If you’re comfortable with GUI utilities like Software Updater and App Center, Topgrade is not something you will have need for. It also doesn’t do anything that can’t be done in other ways (some users like to create their own custom multi-line update scripts).

But Topgrade is worth checking out if you use a diverse range of software sources and want to abstract away the hassle involved in keeping all the things™ up-to-date. The low barrier and automatic detection make this a fuss-free, time-saving tool.