Score:3

How to check if a package is essential / part of base OS install?

fr flag

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)?

user535733 avatar
cn flag
The `libcephfs2` and `librados2` packages were not installed with your Ubuntu system. You installed them later; you can remove them whenever you wish. The `ubuntu-drivers-common` package was part of your original install.
guiverc avatar
cn flag
I'm not actually sure what you're after; you've got an answer so I won't write one, but you've not said what ISO you used to install the system; you can easily look at .list or .manifest files to see what packages are included on a specific ISO (they're always available where the ISO is downloaded from); the .list shows what's on ISO itself, .manifest what's inside the squashfs on the ISO (what I'd look inside), though not all packages included on ISO maybe installed depending on options used to install (and hardware you have if ISO contains OEM drivers etc). I'd also use `apt-cache rdepends`
muru avatar
us flag
Does this answer your question? [Can I see why a package is installed?](https://askubuntu.com/questions/5636/can-i-see-why-a-package-is-installed)
cn flag
Library packages are typically not `Essential` themselves, but will be pulled in by other `Essential` packages. As long as they are marked "automatically installed", they will be automatically removed as soon as they become unnecessary.
Score:13
cn flag

Yes, easily: Simulate a removal and see what happens.

  • Example: apt remove libcephfs2 --simulate
    (No need for sudo 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 means ubuntu-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...]
VHS avatar
de flag
VHS
How is --simulate different from --dry-run?
user535733 avatar
cn flag
@VHS Consult the `apt-get` manpage for the difference: `-s, --simulate, --just-print, --dry-run, --recon, --no-act` are all synonyms. They do exactly the same thing. `--simulate` is uniformly used in this answer for clarity.
Michael Hampton avatar
cn flag
@VHS It is easier for non-native English speakers to understand.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.