Monday, September 25, 2023
 Popular · Latest · Hot · Upcoming
rated 0 times [  3] [ 0]  / answers: 1 / hits: 545  / 9 Months ago, sun, january 29, 2023, 12:48:05

I am using Ubuntu 20.04. During the last 4-5 times I've used upgrade APT always upgrades the following

  linux-headers-5.4.0-96 linux-headers-5.4.0-96-generic
linux-image-5.4.0-96-generic linux-modules-5.4.0-96-generic

when I use autoremove, it says that these same packages will be removed. I'm new to ubuntu and I'm not sure if I'm using these packages in my regular work. But I'd like to know what's going on here?

Possible duplicate.


More From » apt



The current version of the Ubuntu GA kernel is 5.4-0-99. You're currently having the version 5.4-0-96. APT is recommending you to upgrade your kernel to the latest one (5.4-0-99). apt autoremove is suggesting you to remove the older version i.e (5.4-0-96).

Let's take the package linux-headers-5.4.0-96 as an example for understanding it better.

linux-headers-5.4.0-96 is a kernel package, the kernel package are different from the normal packages.

Generally, normal packages like aptitude and neofetch do not change their names when they are upgraded. Unlike normal packages, kernel packages change their name when they're upgraded. For example, linux-headers-5.4.0-96 will change its name to 5.4.0-99.

When a kernel gets upgraded, it comes in the form of a newer package instead of upgrading the older one. For instance, linux-headers-5.4.0-96 got upgraded to 5.4.0-99. Here, the name of the package linux-headers-5.4.0-96 changed to the version 5.4.0-99, thus, is considered as a different package by APT (Advanced Packaging Tool).

According to the developers and repositories, the package 5.4.0-99 is the upgraded version of linux-headers-5.4.0-96, so APT is forced to install it but it does not remove the older version of the package i.e, linux-headers-5.4.0-96.

So, APT is showing an upgrade is available for linux-headers-5.4.0-96. It won't remove the older version of the package as described above.

So, apt upgrade will upgrade the package to its newer version without removing the older one. But what about the older version of the package? Will it remain forever in your system? By default, Ubuntu keeps only the 2 latest kernels. If your system has more than 3 kernels or an obsolete kernel it would be removed by the apt autoremove command.

[#791] Monday, January 30, 2023, 9 Months  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.

Total Points: 11
Total Questions: 122
Total Answers: 118

Location: Peru
Member since Tue, Mar 16, 2021
3 Years ago
herriail questions
Fri, Apr 7, 23, 19:31, 6 Months ago
Tue, May 18, 21, 02:11, 2 Years ago
Sun, Dec 12, 21, 06:06, 2 Years ago
Wed, May 24, 23, 01:42, 4 Months ago
Fri, Jan 21, 22, 01:10, 2 Years ago