Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Lubuntu 12.10 and I know of two ways to tell if a specific program uses GTK2 or GTK3:

  • I can make changes in ~/.themes/theme_name/gtk-2.0/gtkrc, for example, and see if a specific application's appearance is altered.
  • I can run ldd /usr/bin/specific_application | grep gtk

Both these work on a per-app basis.

Is there a way to get a list of installed applications based on whether they use GTK2 or GTK3?

share|improve this question
What might help you echo 'n' | sudo apt-get remove libgtk-3-0. It will show you a huge list (243 packages on my system) of that are depending on libgtk-3. – Anthon Apr 17 '13 at 4:33
I modified that to echo 'n' | apt-get remove -s libgtk-3-0 and it does the job, proposing the removal of 70 packages. If you post that as an answer, I'll accept it. – user15760 Apr 17 '13 at 5:08
I looked for the counterpart to -y (that I use quite often, but overlooked it searching for -n` %-). But with -s, you no longer need to echo 'n' in the command – Anthon Apr 17 '13 at 5:14
Newbie here. I use -s a lot with apt-get. – user15760 Apr 17 '13 at 5:18
Did you check apt-get remove pertinence with apt-cache rdepends? On Arch Linux pacman -Rs gtk3 lists five deps here, while pacman -Sii (list reverse dependancies) gives over two hundreds. – lliseil Sep 29 '15 at 23:17
up vote 5 down vote accepted

You can look at which packages the package manager knows to be dependent on this by using:

apt-get remove -s libgtk-3-0

The -s option makes sure this is a simulation so nothing is actually removed.

share|improve this answer
aptitude search '~i ~D libgtk'

will list all your installed packages that directly depend on gtk.

The more specific

aptitude search '~i ~s gnome'

will list all your installed gnome packages.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.