I use one simple tool to update my Linux OS and all of its software in minutes — Topgrade auto-detects and updates all of of my system via one command

Topgrade
(Image credit: Github repo)

Updating my Linux install can be a chore, but I've found a great way to make it simple. Sure, there are some great apps to maintain my system software via package managers (think app stores, but way more complex), but sometimes I want a terminal app that just gets the job done.

My systems have multiple means to install and manage software, like Ubuntu, which uses .deb, snap, and Flatpak, and I also use programming languages such as Python, which has its own package manager, so I want a tool that does it all and with no fuss. This is where Topgrade comes in.

Written in Rust, Topgrade has been around for a few years, which only solidifies its usefulness. I’m running it on AnduinOS, a fork of Ubuntu, but it works on Debian, Ubuntu, Arch, Windows, macOS, Manjaro, and many other Linux distributions

How to install Topgrade

Installing Topgrade is simple, but there is a caveat. The source for the Debian package (.deb) file is outside the official Ubuntu repositories. So take care with installing it on any mission-critical hardware. If in doubt, check the source code. Everything runs well, and I did not encounter any issues, but your mileage may vary.

1. On your Ubuntu PC, go to the Topgrade Github releases page and download the release for your system. I chose the latest release for 64-bit Intel/AMD CPUs.

Topgrade

(Image credit: Tom's Hardware)

2. Open a terminal and navigate to the directory where the download is located. In my case, it was /home/les/Downloads.

3. Install topgrade using the apt package manager. Typically, we would use apt to install a package from a remote repository, but by specifying the downloaded file, it will install Topgrade and all of its dependencies.

sudo apt install ./topgrade_16.0.4-1_amd64.deb

Topgrade

(Image credit: Tom's Hardware)

How to use Topgrade

Topgrade is simple to use, but underneath the simplicity lies a lot of power. Let's get used to updating our system before moving on to tweaking Topgrade’s configuration.

1. First, perform a dry run of Topgrade to check that when we use Topgrade, everything runs as expected. Using -n or –dry-run will print what will be done when Topgrade runs for real, but no changes are made to the OS.

topgrade -n

2. Update and upgrade the software on your machine using Topgrade. When prompted enter your sudo password and the process will start.

3. When prompted to continue, select Y. This will start the upgrade process, installing new software using all of the package managers on your system. You can automate this process by using topgrade -y.

Topgrade

(Image credit: Tom's Hardware)

Tweaking Topgrade

What if you don’t want Topgrade to update a specific part of your system? We can either update a configuration file to tell Topgrade to ignore certain sources or pass the instruction directly when running the topgrade command from the terminal. First I’ll show you how to edit the configuration file, then show you two steps to do the same thing, right from the terminal.

1. In a text editor, open ~/.config/topgrade.toml. This file contains the Topgrade configuration details. If you cannot see the file in your text editor, press CTRL + H to see hidden files.

Topgrade

(Image credit: Tom's Hardware)

2. To disable updating flatpak, scroll down to a line that states “Disable specific steps”. Remove the the # and alter the text inside the [ ] to “flatpak”.

Topgrade

(Image credit: Tom's Hardware)

3. Save the file.

4. Open a terminal and perform a dry run. You should see the updates scroll up the screen, but there will be no mention of Flatpak.

topgrade -n

Topgrade

(Image credit: Tom's Hardware)

5. Run the update for real. There should still be no mention of Flatpak.

topgrade

Topgrade

(Image credit: Tom's Hardware)

6. Optional steps. Go back to Step 1 and repeat the steps, this time remove the line disable = [“flatpak”]. I want to update Flatpak at the same time as the other packages so I removed the line entirely. If you wish to keep the line, but deactivate it, put a # at the start of the line.

To perform the same actions from the terminal

1. To only update certain sources, override the configuration file using this command. Here I only want to update flatpak packages.

topgrade –only flatpak

Topgrade

(Image credit: Tom's Hardware)

2. Inversely to only disable Flatpak updates, and perform other updates, run this command.

topgrade –disable flatpak

Topgrade

(Image credit: Tom's Hardware)

3. If you get stuck, or want to learn more about Topgrade, this command will print all of the available options and explain their uses.

topgrade –help

Topgrade

(Image credit: Tom's Hardware)
Les Pounder

Les Pounder is an associate editor at Tom's Hardware. He is a creative technologist and for seven years has created projects to educate and inspire minds both young and old. He has worked with the Raspberry Pi Foundation to write and deliver their teacher training program "Picademy".

  • Zforgetaboutit
    "Topgrade auto-detects and updates all of of my system via one command"Maybe use it to check the article heading's grammar? :D
    Reply