0

The clear answer is that you can use rpm -e <package name>. This will not remove any package if there are dependencies.

My question would be is that possible with yum? If you do manually using yum, it is easy you can just type 'N' if dependencies detected. Is there elegant way in the script? Unfortunately, I found that repoquery is not 100% accurate to list dependencies. Running yum remove <package> -n and parsing the output looks also not nice solution even if this is possible. Please let me know your ideas, thanks

laimison
  • 1,409
  • 3
  • 17
  • 39

1 Answers1

0

It seems the best possible way is to use rpm -e --test <package> to get accurate list of dependencies. Each package from the output can be checked again using the same command for deeper level of dependencies.

laimison
  • 1,409
  • 3
  • 17
  • 39