-1

I sometimes install .deb files that have a "Provides" field. From what I understand, if e.g. a package called "expack" is listed here then if another .deb file depends on expack it will not need to install it (if I do apt-get). But if I do apt-cache show expack then it will not show that it's installed. So how do I check that the 'expack' dependency is installed (without using a specific package that depends on 'expack', just using only the argument 'expack') ?

Braiam
  • 67,791
  • 32
  • 179
  • 269
Xu Wang
  • 347
  • 2
  • 4
  • 14

1 Answers1

3

Here's the answer:

apt-cache showpkg expack

Source: Commrent below by Xu-Wang

Also, the whereis command works in most cases to show these packages and their path or location as well.

whereis expack

here's the output:

expack: /usr/games/expack /usr/share/man/man1/expack.1.gz

This shows that expack is installed and the location is "/usr/games/expack" .

Also, packages that are typically provided by other packages in virtual packages will typically show using the apt-cache search command

apt-cache search expack

here's the output

exult-studio - tools for editing and viewing exult games

So, exult-studio provides expack and satisfies the dependency expack according to http://www.debian.org/doc/debian-policy/ch-relationships.html (see 7.5 virtual packages)

where expack = bar and exult-studio = bar-plus.

To see a list of a packages dependencies and to also see if the dependencies are already installed, use the application apt-rdepends

sudo apt-get apt-rdepends

To list dependencies and status of all dependencies as well use apt-rdepends -p

apt-rdepends -p packagename 
mchid
  • 43,546
  • 8
  • 97
  • 150
  • that would show if the expack is installed. It would not show if the expack dependency is satisfied. It is a different thing. For more information on "provides", see http://www.debian.org/doc/debian-policy/ch-relationships.html – Xu Wang Jun 15 '14 at 06:29
  • @XuWang I'm sorry, I misunderstood and the answer has been updated. Please let me know if that's not what you are looking for. Thanks! – mchid Jun 15 '14 at 09:36
  • 1
    Thank you for your effort (+1). I finally found what I was looking for. If I do "apt-cache showpkg expack", if expack is known to apt then it will list "reverse provides". That's what I'm interested in. Can you add that to your answer? – Xu Wang Jun 20 '14 at 14:14