4

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?

  • 1
    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 04:33
  • 1
    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. –  Apr 17 '13 at 05: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 05:14
  • Newbie here. I use -s a lot with apt-get. –  Apr 17 '13 at 05: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. – tuk0z Sep 29 '15 at 23:17

2 Answers2

6

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.

Anthon
  • 79,293
2
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.

Tobu
  • 6,593