Thursday, May 2, 2024
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 350  / 3 Years ago, mon, august 16, 2021, 2:40:27

I have /usr/share/gtksourceview-2.0/ and I think it maybe due to Mousepad or Geany or Medit text editors. But how can I know for sure without uninstalling them and reinstalling one-by-one?



(I don't know what tag to use so I put gtk.)


More From » package-management

 Answers
7


Try:



apt-cache depends <package-name>  |  grep gtksourceview


With Mousepad, I get this:



$ apt-cache depends mousepad | grep gtksourceview
Depends: libgtksourceview2.0-0


The others (Geany and Medit) don't depend on version 2.0 of GtkSourceView.






As a side note, to check which packages provide a directory/file, you can use dpkg -S <package-name> if the file is in your system or apt-file for the general case:



dpkg -S /usr/share/gtksourceview-2.0       # local file/directory
apt-file find /usr/share/gtksourceview-2.0 # works even if the file is not installed


Since apt-file is not installed by default you need to sudo apt-get install apt-file. With the above command, I get (among other results) the package libgtksourceview2.0-common. Now I can use apt-cache rdepends to seek for packages which directly/indirectly provide the directory:



$ apt-cache rdepends libgtksourceview2.0-common
libgtksourceview2.0-common
Reverse Depends:
libgtksourceview2.0-0
libgtksourceview2.0-0

$ apt-cache rdepends libgtksourceview2.0-0 | grep 'geany|medit|mousepad'
mousepad


This also seems to work (and possibly more general):



apt-cache rdepends libgtksourceview2.0-common 
--recurse
--no-recommends
--no-suggests | grep 'geany|medit|mousepad'

[#26503] Wednesday, August 18, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
leddre

Total Points: 180
Total Questions: 113
Total Answers: 108

Location: France
Member since Thu, Oct 27, 2022
2 Years ago
;