Issue
For example,rpm A requires B1,B2,etc... and B requires C1,C2,etc...
Now I need force removing B1 and all packages introduced by B1's requirements. So the fact "B1 is required by A" need to be ignored, but "B1 requires C1, C2, etc..." need to be considered. That means if C1 is only required by B1, then remove it at the same time. But if C1 is required by someone else, keep it.
if using rpm -e --nodeps, only B1 will be removed, packages introduced by it will be left. In other hand, using yum autoremove cannot remove B1 since it is required by A. So is there a solution to meet both requirements?
Solution
No, there is no way.
Unless you want to install at the same time B2 which provides what A requires. In that case:
dnf swap -- install B2 -- remove B1
It works for yum as well.
Answered By - msuchy Answer Checked By - Dawn Plyler (WPSolving Volunteer)