Why does 'dnf remove' also uninstall RPM packages that are dependencies of the main package when using the container image ubi:9.5-1745854298?
Issue
- Is
dnf historypreserved starting with UBI:9.5-1745854298? - While removing packages from latest UBI image,
dnf removeremoves dependencies along with rpm unlike with old tags which only removes the package.
$ podman run registry.access.redhat.com/ubi9@sha256:f4ebd46d3ba96feb016d798009e1cc2404c3a4ebdac8b2479a2ac053e59f41b4 dnf remove subscription-manager
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered with an entitlement server. You can use subscription-manager to register.
Dependencies resolved.
=======================================================================================================
Package Arch Version Repository Size
=======================================================================================================
Removing:
subscription-manager x86_64 1.29.42-1.el9 @rhel-9-for-x86_64-baseos-rpms 3.3 M
Removing unused dependencies:
dbus-libs x86_64 1:1.12.20-8.el9 @rhel-9-for-x86_64-baseos-rpms 364 k
dmidecode x86_64 1:3.6-1.el9 @rhel-9-for-x86_64-baseos-rpms 263 k
[..]
python3-subscription-manager-rhsm x86_64 1.29.42-1.el9 @rhel-9-for-x86_64-baseos-rpms 452 k
subscription-manager-rhsm-certificates noarch 20220623-1.el9 @rhel-9-for-x86_64-baseos-rpms 27 k
which x86_64 2.21-29.el9 @rhel-9-for-x86_64-baseos-rpms 80 k
Transaction Summary
=======================================================================================================
Remove 33 Packages
Freed space: 23 M
Is this ok [y/N]:
Environment
- Podman
- Universal Base Image 9
- Red Hat Enterprise Linux
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.