jhnmcknght: Professional Amateur

Update Debian Like a Pro

When updating packages in Debian (and its derivatives, of course) the age old commands still hold true:

sudo apt update
sudo apt upgrade

and you're all done. While not absolutely necessary, there are a few additional commands I use for sanity (system, not mine -- well, maybe mine) reasons.

Be a Pro (but not a pro pro)

Sanity Check

The first additional command we're going to add is the following:

sudo dpkg -C

and this is what the dpkg man page has to say about the -C flag:

-C, --audit [package-name...]
    Performs database sanity and consistency checks for package-name
    or all packages  if  omitted  (per  package  checks  since  dpkg
    1.17.10).   For  example,  searches  for packages that have been
    installed only partially on your system or  that  have  missing,
    wrong  or obsolete control data or files. dpkg will suggest what
    to do with them to get them fixed.

Check Potentially Pending Actions

First you're going to have to type aptitude then once in its interface, you'll want to hit g. Here's what aptitude's help has to say about this:

"g":    Perform all pending installations, removals, and upgrades.

Where I find this useful is if you've removed a piece of software and apt recommends running apt autoremove and you've run it. This process may (very rarely) remove a dependency you still need so running aptitude then pressing g should square you away in the rare instance this does happen. Otherwise, hitting g should return the following message:

No packages are scheduled to be installed, removed, or upgraded.

where you'll hit enter on the Ok button then hit q to quit.

The Rest

If you're a user of Flatpak like I am for a few pieces of software (Signal and Spotify), this will update those:

flatpak update

In Summary

Here's what my software updating process looks like which I run a couple times per week:

sudo apt update
sudo apt upgrade
sudo dpkg -C
sudo aptitude (then hitting g within its interface, q to quit)
flatpak update

Welp, That's It

You read the heading -- that's it, we're done here. You should at minimum feel like a professional amateur like I've made a career out of.

Tags: #debian #linux #apt #package management