Description of problem: Investigating if libssh is installed, i found (once again) that rpm does not fully understand it's own dependency tree. the result is, that when asked if any package requires libssh, the answere is "none", but dnf finds > 1 packages that need libssh. In my example below, we have sub-sub-sub-dependencies involved, thats why we end up at 39 packages removed. It's unclear which package really depends on libssh, but i guess thats a dnf problem. Conclusion: "rpm -q --whatrequires" is buggy. This can lead to accidently deleted packages, if a "dnf -y erase ..." is used on a package, when rpm ... return "" as a result. (and i so voted for rpm being the better system compared to dkpg :( ) Version-Release number of selected component (if applicable): rpm-4.14.2-1.fc27.x86_64 Working: [root@eve marius]# rpm -q --whatrequires kodi kodi-pvr-addons-common-14.0-0.2.20150125gita0a437e.fc21.noarch kodi-pvr-iptvsimple-2.4.14-1.fc27.x86_64 kodi-pvr-vdr-vnsi-2.6.25-1.fc27.x86_64 not working: [root@eve marius]# rpm -q --whatrequires libssh Kein Paket benötigt libssh [root@eve marius]# Proof that is wrong: [root@eve ~]$ dnf erase libssh Abhängigkeiten sind aufgelöst. ======================================================================================================================== Paket Arch Version Paketquelle Größe ======================================================================================================================== Entfernen: libssh x86_64 0.7.6-1.fc27 @updates 513 k Removing dependent packages: gnome-boxes x86_64 3.26.4-1.fc27 @updates 5.3 M kodi x86_64 17.6-1.fc27 @rpmfusion-free 53 M kodi-pvr-addons-common noarch 14.0-0.2.20150125gita0a437e.fc21 @System 37 k kodi-pvr-iptvsimple x86_64 1:2.4.14-1.fc27 @rpmfusion-free-updates 407 k kodi-pvr-vdr-vnsi x86_64 1:2.6.25-1.fc27 @rpmfusion-free-updates 761 k libvirt-client x86_64 3.7.0-6.fc27 @updates 806 k libvirt-daemon x86_64 3.7.0-6.fc27 @updates 2.8 M libvirt-daemon-config-network x86_64 3.7.0-6.fc27 @updates 228 libvirt-daemon-driver-interface x86_64 3.7.0-6.fc27 @updates 113 k libvirt-daemon-driver-network x86_64 3.7.0-6.fc27 @updates 564 k libvirt-daemon-driver-nodedev x86_64 3.7.0-6.fc27 @updates 117 k libvirt-daemon-driver-nwfilter x86_64 3.7.0-6.fc27 @updates 170 k libvirt-daemon-driver-qemu x86_64 3.7.0-6.fc27 @updates 1.5 M libvirt-daemon-driver-secret x86_64 3.7.0-6.fc27 @updates 85 k libvirt-daemon-driver-storage x86_64 3.7.0-6.fc27 @updates 0 libvirt-daemon-driver-storage-core x86_64 3.7.0-6.fc27 @updates 616 k libvirt-daemon-driver-storage-disk x86_64 3.7.0-6.fc27 @updates 23 k libvirt-daemon-driver-storage-gluster x86_64 3.7.0-6.fc27 @updates 23 k libvirt-daemon-driver-storage-iscsi x86_64 3.7.0-6.fc27 @updates 15 k libvirt-daemon-driver-storage-logical x86_64 3.7.0-6.fc27 @updates 23 k libvirt-daemon-driver-storage-mpath x86_64 3.7.0-6.fc27 @updates 11 k libvirt-daemon-driver-storage-rbd x86_64 3.7.0-6.fc27 @updates 31 k libvirt-daemon-driver-storage-scsi x86_64 3.7.0-6.fc27 @updates 15 k libvirt-daemon-driver-storage-sheepdog x86_64 3.7.0-6.fc27 @updates 15 k libvirt-daemon-driver-storage-zfs x86_64 3.7.0-6.fc27 @updates 15 k libvirt-daemon-kvm x86_64 3.7.0-6.fc27 @updates 0 libvirt-glib x86_64 1.0.0-2.fc26 @fedora 257 k libvirt-gobject x86_64 1.0.0-2.fc26 @fedora 216 k libvirt-libs x86_64 3.7.0-6.fc27 @updates 22 M python2-pillow x86_64 4.3.0-1.fc27 @fedora 2.0 M wireshark x86_64 1:2.6.2-1.fc27 @updates 0 wireshark-cli x86_64 1:2.6.2-1.fc27 @updates 89 M wireshark-gtk x86_64 1:2.6.2-1.fc27 @updates 2.2 M wireshark-qt x86_64 1:2.6.2-1.fc27 @updates 7.4 M Entferne ungültige Abhängigkeiten: libmaxminddb x86_64 1.2.0-4.fc27 @fedora 34 k python2-olefile noarch 0.45.1-1.fc27 @updates 3.6 M systemd-container x86_64 234-11.git5f8984e.fc27 @updates 959 k zfs-fuse x86_64 0.7.2.2-6.fc27 @fedora 5.9 M Transaktionsübersicht ======================================================================================================================== Entfernen 39 Pakete Freigegebener Speicherplatz: 201 M Ist dies in Ordnung? [j/N]:n
Well, this is by design. Technically no packages require libssh, however there are packages requiring `libssh.so.4()(64bit)`. You probably should use `dnf repoquery --whatrequires --installed libssh`.
Like Igor said, this is by design. --whatrequires queries the literal capability passed as argument. From the man-page: > --whatrequires CAPABILITY > Query all packages that require CAPABILITY for proper functioning. For now, dnf repoquery is the friendlier tool for the purpose.