When checking for packages that depend on a particular package (in this case lz4) using rpm it does not list any packages that require either lz4-1.7.5-2.el7.i686 and lz4-1.7.5-2.el7.x86_64...
# rpm -q --whatrequires lz4-1.7.5-2.el7.i686
no package requires lz4-1.7.5-2.el7.i686
# rpm -q --whatrequires lz4-1.7.5-2.el7.x86_64
no package requires lz4-1.7.5-2.el7.x86_64
#
But I can't uninstall either of them without using rpm --nodeps as they appear to be needed by systemd and/or systemd-libs.
# rpm --erase --allmatches lz4
error: Failed dependencies:
liblz4.so.1()(64bit) is needed by (installed) systemd-libs-219-57.el7_5.1.x86_64
liblz4.so.1()(64bit) is needed by (installed) systemd-219-57.el7_5.1.x86_64
liblz4.so.1 is needed by (installed) systemd-libs-219-57.el7_5.1.i686
#
It looks like the output of rpm --whatrequires is wrong but is it? (I doubt that it is actually wrong - but I don't understand why doesn't it include systemd or systemd-libs?
I thought if using rpm --erase --test instead of rpm --whatrequires to identify if packages that have dependencies but is there another more reliable way to do this?
Thanks for your help.