Is there a way to know which GTK version is installed using the command line?

Solution 1:

apt-cache policy libgtk2.0-0 libgtk-3-0 (optionally pipe to grep Installed)

or

dpkg -l libgtk2.0-0 libgtk-3-0

Solution 2:

Try this:

dpkg -l libgtk2.0-0 libgtk-3-0

This will give info for both GTK 2 and 3.

Solution 3:

--get-selections will show you the installed packages

dpkg --get-selections | grep gtk