There's a decade old answered question "The following packages have been kept back:" Why and how do I solve it?.
The answers are variations on these three themes:
sudo apt-get --with-new-pkgs upgrade <list of packages kept back> # theme 1
sudo apt-get dist-upgrade # theme 2
sudo apt-get install <list of packages kept back> # theme 3
My version of this issue is; I run sudo apt-get update; sudo apt-get upgrade
and am confronted with the following output:
The following packages have been kept back:
coreutils libpulse-dev libpulse-mainloop-glib0 libpulse0 libpulse0:i386
libpulsedsp pulseaudio-utils snapd update-notifier update-notifier-common
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
And this is everytime I run sudo apt-get update; sudo apt-get upgrade
. I can't recall if it's always the same ten packages or ~10 different packages each time. Anyways, I go ahead and start trying the solutions referenced earlier:
sudo apt-get --with-new-pkgs upgrade <list of packages kept back> # theme 1
sudo apt-get dist-upgrade # theme 2
Neither of those works (and yes I do replace <list of packages kept back>
with the actual names of the packages kept back). Nothing is displayed in my terminal after issuing those commands. Just two blank lines. So I'm forced to try the last option:
sudo apt-get install <list of packages kept back> # theme 3
This works but has it's issues:
- I have to copy/paste from the terminal output (I always forget the terminal copy/paste shortcut key)
- There's always spaces/line breaks/etc. that don't copy/paste well in my terminal
- I myself introduce typos and human error
- It's just a bad way to do things, you get the point.
Is there any clean way to run one command (or script) that will upgrade my system by way of apt? I'd even (gasp) settle for a GUI upgrade button at this point. It's just a minor headache to always have a <list of packages kept back>
anytime I upgrade any of my systems.