Reverse dependency generation with zypper

user626201 picture user626201 · Aug 29, 2012 · Viewed 7.5k times · Source

With zypper, I can get package A depends on package B. However, what I need to know is which packages depend on package B.

Is there a way of generating a reverse dependency list?

Answer

Antonio picture Antonio · Nov 19, 2015

You can search (abbreviated with "se") for packages that require a certain package with:

zypper se --requires packagename

Also, you can search only among installed packages with:

zypper se -i --requires packagename

For example, to look for packages requiring libpng:

# zypper se -i --requires libpng
Loading repository data... 
Reading installed packages...
S | Name                        | Summary                                                             | Type   
--+-----------------------------+---------------------------------------------------------------------+--------
i | DirectFB                    | Graphics Library for Framebuffer Devices                            | package
i | MPlayer                     | Multimedia Player                                                   | package
i | cairo-devel                 | Development environment for cairo                                   | package
etc.