1. Updating Packages on Linux

Sunday, Aug 10, 2025

# Updating Packages on Linux

I've found Fedora to be quite nice lately, but I've also spent a few years using Pop!_OS and Ubuntu server. It's always a bit of a hassle to remember which commands to run to install updates, especially when adding in flatpak, so I started writing a common update script.

Here's what it looks like on my Ubuntu server:

/usr/local/bin/up

#!/bin/sh

sudo apt update &&  sudo apt upgrade -y && sudo apt autoremove -y

And here's what it looks like on my Fedora laptops and workstation:

/usr/local/bin/up

#!/bin/sh

set -x

sudo dnf up -y

flatpak update -y

Remember, after editing this file you'll need to use chmod +x so it can be invoked. For instance:

sudo chmod +x /usr/local/bin/up

Now whenever I want newer packages, I just type up in my terminal.

This does not update system firmware. I do that using the Software UI, though there is a CLI called fwupdmgr available for that, too. man fwupdmgr to learn about it.

I also read about a project called Topgrade which updates lots of things on Linux. That's overkill for me, though.


Related Notes