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.
You may likeWritten 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 TopgradeInstalling 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.
2. Open a terminal and navigate to the directory where th e 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.debTopgrade 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 -n2. 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 ca n automate this process by using topgrade -y.
What if you don't want Topgrade to update a spe cific 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.
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".
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 -n5. Run the update for real. There should still be no mention of Flatpak.
topgrade6. 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 terminal1. To only update certain sources, override the configuration file using this command. Here I only want to update flatpak pac kages.
topgrade –only flatpak2. Inversely to only disable Flatpak updates, and perform other updates, run this command.
topgrade –disable flatpak3. If you get stuck, or want to learn more about Topgrade, this command wil l print all of the available options and explain their uses.
topgrade –help
No comments