Package Management (Essential Packages)

If I install nping on my 22.03 snapshot it pulls in libstdcpp6.

Then if I try to remove nping and its dependency I see:

root@OpenWrt:~# opkg remove --autoremove nping
Removing package nping from root...
libstdcpp6 was autoinstalled and is now orphaned, removing.
Refusing to remove essential package libstdcpp6.
        Removing an essential package may lead to an unusable system, but if
        you enjoy that kind of pain, you can force opkg to proceed against
        its will with the option: --force-removal-of-essential-packages
No packages removed.

The message above "No packages removed." is wrong or at least misleading in this instance because nping was actually removed.

So then I need to use the force option to remove the remaining orphaned package, which is clearly not an essential package for my system.

root@OpenWrt:~# opkg remove libstdcpp6 --force-removal-of-essential-packages
Removing essential package libstdcpp6 under your coercion.
        If your system breaks, you get to keep both pieces
Removing package libstdcpp6 from root...

Isn't this reflective of two counts of broken behaviour:

  • the message 'No packages removed.' is not correct or at least misleading in this situation; and

  • certain non-essential packages are marked as essential and pulling them in as a dependency of a parent package means they stay as orphaned packages when removing the parent package.

FYI, the device did inform you that it removed the package.

The other line is regarding the cpp package. I understand how that could be confusing.

1 Like