| REVDEP(8) | System Manager's Manual | REVDEP(8) |
revdep — find
packages with broken shared library dependencies
revdep |
[-v] [-i
package,...]
[package ...] |
revdep |
[-v] [-i
package,...]
-r package ... |
revdep |
-h | -V |
revdep checks installed packages for
shared libraries that the dynamic linker would not find. Without a
package, every installed package is checked.
The files of a package are read from the package database. Each
one that is an x86_64 executable or shared object is inspected: every
library in its DT_NEEDED entries must be found, as
described in LIBRARY SEARCH, and
must itself be an x86_64 ELF file. Other files, and ELF files for other
architectures, are skipped. A package is broken if one of its files needs a
library that is not found, or if it has files in the directory of an older
Python or Perl; see STALE
LANGUAGE PATHS.
With -r, revdep
reports the reverse: the packages that link against a shared library of one
of the named packages. Run it after updating a library to see what may need
rebuilding. A shared library is a file named name.so
or name.so.N ...; a package
depends on it if a DT_NEEDED entry of one of its
files is that name.
Options must come before the package names. The options are as follows:
-h-i
package,...-r not reported. May be given more than once.-r-V-v-r
of the dependent packages, one per line, for use in scripts.-v-vv-r the files
that need a library of the named packages.-vvv-vvvvA library is looked for the way the musl dynamic linker does:
DT_NEEDED entry containing a
‘/’ is taken as a path.DT_RUNPATH, or in
DT_RPATH if there is no
DT_RUNPATH. $ORIGIN is
replaced by the directory of the file being checked and
$LIB by lib.:’ or new lines, if that file
exists, otherwise /lib,
/usr/local/lib and
/usr/lib.Modules built for one Python or Perl version are installed in a directory named after it, and are not found once another version is installed.
If the package python3 is installed, a
package with a file under
/usr/lib/pythonX.Y/
is broken when X.Y is not the major and minor version
of that package.
If the package perl is installed, a
package with a file under
/usr/lib/perl5/site_perl/version/
is broken when version is not the version of that
package.
#’ are comments.Without -r, revdep
exits 0 if no checked package is broken and 1 otherwise. With
-r, finding dependent packages is not an error; it
exits 0. Both exit 1 if a named package is not installed or the package
database cannot be read.
Check every installed package:
# revdepCheck two packages, showing the broken files:
# revdep -vv firefox
chromiumAfter updating wlroots and wayland, list what links against them:
# revdep -r wlroots
waylandCheck everything except the kernel and firmware:
# revdep -i
linux,linux-firmwareTo rebuild a broken package, raise release
in its port and run pkg sysup; see
pkg(8).
zorz
<zorz@gmx.com>, after the
revdep of James Buren for CRUX.
musl also looks for a library in the
DT_RPATH or DT_RUNPATH of
the program or library that loaded the one needing it.
revdep checks each file on its own, so a library
found only that way is reported missing.
| September 27, 2026 | revdep 1.3.0 |