Command which lists installed applications based on whether they use GTK2 or GTK3

gtk

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?

Best Answer

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.