Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How can I find out why apt-get is keeping a package back?

11 views
Skip to first unread message

L L

unread,
Jul 10, 2022, 6:30:06 PM7/10/22
to
How can I find out why apt-get is keeping a package back?

David Wright

unread,
Jul 10, 2022, 11:40:05 PM7/10/22
to
On Sun 10 Jul 2022 at 15:24:11 (-0700), L L wrote:
> How can I find out why apt-get is keeping a package back?

I usually look at the output of apt-cache show <package>.
For example, after running apt-get update, I currently have
linux-image-amd64 held back. Thus:

$ apt-cache show linux-image-amd64
Package: linux-image-amd64
Source: linux-signed-amd64 (5.10.127+1)
Version: 5.10.127-1
Provides: linux-image-generic, linux-latest-modules-5.10.0-16-amd64, virtualbox-guest-modules, wireguard-modules (= 1.0.0)
Depends: linux-image-5.10.0-16-amd64 (= 5.10.127-1)
Description-en: Linux for 64-bit PCs (meta-package)
This package depends on the latest Linux kernel and modules for use on PCs
with AMD64, Intel 64 or VIA Nano processors.
Built-Using: linux (= 5.10.127-1)
Filename: pool/main/l/linux-signed-amd64/linux-image-amd64_5.10.127-1_amd64.deb

Package: linux-image-amd64
Source: linux-signed-amd64 (5.10.120+1)
Version: 5.10.120-1
Provides: linux-image-generic, linux-latest-modules-5.10.0-15-amd64, virtualbox-guest-modules, wireguard-modules (= 1.0.0)
Depends: linux-image-5.10.0-15-amd64 (= 5.10.120-1)
Description-en: Linux for 64-bit PCs (meta-package)
This package depends on the latest Linux kernel and modules for use on PCs
with AMD64, Intel 64 or VIA Nano processors.
Built-Using: linux (= 5.10.120-1)
Filename: pool/updates/main/l/linux-signed-amd64/linux-image-amd64_5.10.120-1_amd64.deb

$

(with many uninteresting lines snipped).

Its Depends is currently satisfied by linux-image-5.10.0-15-amd64
(installed), but it could be upgraded by installing the new package,
linux-image-5.10.0-16-amd64, which would require running
# apt-get dist-upgrade.

Cheers,
David.

Cindy Sue Causey

unread,
Jul 11, 2022, 3:00:05 AM7/11/22
to
On 7/10/22, David Wright <deb...@lionunicorn.co.uk> wrote:
> On Sun 10 Jul 2022 at 15:24:11 (-0700), L L wrote:
>> How can I find out why apt-get is keeping a package back?
>
> I usually look at the output of apt-cache show <package>.

I accidentally stumbled upon that I can "apt-get upgrade <package>"
and see what is likely the trigger for held packages. For me, it
always hesitates and waits for approval. Most often, packages I've
seen are being held back because of an upgrade to the next versioning
plateau or because completely brand new packages are being installed
along with.

Being able to "-s" simulate with apt-get is something I always forget
exists. I just test drove it, and it worked for upgrade in general:

apt-get upgrade -s

There wasn't anything held back this time so I can only assume that
simulate would additionally work for:

apt-get upgrade <package> -s

That can be run just like that, as regular User instead of root.

Simulation doesn't give the 100% full picture. It might not generate
enough focus on the held package to answer why it's being held. May be
why I don't remember to use it. I played with simulation a couple
times, and it's a cute trick. At the end of the day, though, I just go
straight for the real upgrade. For me so far, that route has been
informative and has worked safely #1 because it doesn't continue until
I hit the ENTER key again. :)

Cindy :)
--
Talking Rock, Pickens County, Georgia, USA
* runs with birdseed *
0 new messages