How to display reverse package dependencies

Display reverse dependencies to inspect which packages depend on given application or library.

Use apt-cache utility to display reverse dependencies

Display reverse dependencies for particular package located in configured repository.

$ apt-cache rdepends --no-recommends --no-suggests --no-enhances tmux
tmux
Reverse Depends:
 |byobu
  tmuxinator
  tmux-plugin-manager
  apt-dater

Recursively display reverse dependencies for particualar package located in configured repository.

$ apt-cache rdepends --no-recommends --no-suggests --no-enhances --recurse tmux
tmux
Reverse Depends:
 |byobu
  tmuxinator
  tmux-plugin-manager
  apt-dater
byobu
Reverse Depends:
tmuxinator
Reverse Depends:
tmux-plugin-manager
Reverse Depends:
apt-dater
Reverse Depends:
  apt-dater-dbg
apt-dater-dbg
Reverse Depends:

There can be too much information in the above example, so the recursive view is not really useful in the command-line.

Use aptitude utility to display reverse package dependencies

Install a high-level interface to the package manager.

$ sudo apt-get install aptitude

Display verbose reverse dependencies for particular package located in configured repository.

$ aptitude search '~Dtmux'
p   apt-dater                                   - terminal-based remote package update manager         
p   byobu                                       - text window manager, shell multiplexer, integrated De
p   tmux-plugin-manager                         - tmux plugin manager based on git                     
p   tmuxinator                                  - Create and manage tmux sessions easily            

Display reverse dependencies for particular package located in configured repository.

$ aptitude search -F '%p' '~Dtmux'
apt-dater                                                                                              
byobu                                                                                                  
tmux-plugin-manager                                                                                    
tmuxinator          

Use apt-rdepends utility to display reverse package dependencies

Install an utility that performs recursive reverse dependency listings similar to apt-cache.

$ sudo apt-get install apt-rdepends

Display reverse dependencies for particular package located in configured repository.

$ apt-rdepends --reverse --print-state tmux --state-follow=none
Reading package lists... Done
Building dependency tree       
Reading state information... Done
tmux
  Reverse Depends: apt-dater (1.0.3-4) [NotInstalled]
  Reverse Depends: byobu (>= 5.112-1) [NotInstalled]
  Reverse Depends: tmux-plugin-manager (>= 3.0.0-1) [NotInstalled]
  Reverse Depends: tmuxinator (0.9.0-1) [NotInstalled]

Recursively display reverse dependencies for particualar package located in configured repository.

$ apt-rdepends --reverse --print-state tmux
Reading package lists... Done
Building dependency tree       
Reading state information... Done
tmux
  Reverse Depends: apt-dater (1.0.3-4) [NotInstalled]
  Reverse Depends: byobu (>= 5.112-1) [NotInstalled]
  Reverse Depends: tmux-plugin-manager (>= 3.0.0-1) [NotInstalled]
  Reverse Depends: tmuxinator (0.9.0-1) [NotInstalled]
apt-dater
  Reverse Depends: apt-dater-dbg (= 1.0.3-4) [NotInstalled]
apt-dater-dbg
byobu
tmux-plugin-manager
tmuxinator

About Milosz Galazka

Milosz is a Linux Foundation Certified Engineer working for a successful Polish company as a system administrator and a long time supporter of Free Software Foundation and Debian operating system.