How to check if a package is essential / part of base OS install?
How to check if a package is essential / part of base Ubuntu (v18.04.5) install?
Eg. I keep seeing Ceph and RADOS updates in my weekly software updater GUI, ie...
➜ ~ apt list --upgradable
Listing... Done
libcephfs2/bionic-updates 12.2.13-0ubuntu0.18.04.8 amd64 [upgradable from: 12.2.13-0ubuntu0.18.04.7]
librados2/bionic-updates 12.2.13-0ubuntu0.18.04.8 amd64 [upgradable from: 12.2.13-0ubuntu0.18.04.7]
ubuntu-drivers-common/bionic-updates 1:0.8.6.3~0.18.04.1 amd64 [upgradable from: 1:0.5.2.5]
I don't remember if I installed these myself as some experiment some time ago or if they are part of the base / essential Ubuntu install. If they are not part of the base install or essential "normal" Ubuntu systems, then I'd like to remove these packages. Is there any way to tell (esp. re. how to tell what else would be affected by its deletion)?
Solution 1:
Yes, easily: Simulate a removal and see what happens.
- Example:
apt remove libcephfs2 --simulate
(No need forsudo
since you don't really want any changes)
Read the output carefully: If the list of removals is long, and/or includes critical packages like gnome-shell
or gdm
or ubuntu-desktop
or ubuntu-standard
, or applications that you use, then you know that removing it may be more trouble than is conveniently worthwhile.
Here's an edited example of simulating the removal of ubuntu-drivers-common
on a test system.
- Note the lack of
sudo
and the prominent--simulate
flag. Safety! - Note that one of the impacted packages is
ubuntu-desktop
. That meansubuntu-drivers-common
was part of the original base install.
$ apt remove ubuntu-drivers-common --simulate
NOTE: This is only a simulation!
apt needs root privileges for real execution.
Keep also in mind that locking is deactivated,
so don't depend on the relevance to the real current situation!
[...edit...]
The following packages were automatically installed and are no longer required:
apturl-common gir1.2-goa-1.0 gir1.2-snapd-1 python3-click python3-colorama
python3-dateutil python3-debconf python3-software-properties python3-xkit
software-properties-common unattended-upgrades update-notifier-common
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
apturl nautilus-share software-properties-gtk ubuntu-desktop
ubuntu-desktop-minimal ubuntu-drivers-common ubuntu-release-upgrader-gtk
update-manager update-notifier
0 upgraded, 0 newly installed, 9 to remove and 0 not upgraded.
[...edit...]