23

I ran the following command successfully

dpkg -i library.deb

Where can I find where this file was installed?

Kevin Meredith
  • 375
  • 1
  • 4
  • 14

3 Answers3

26

If you are asking where the deb package goes: /var/cache/apt/archives.

If you are asking where the files in the deb package get installed to, then do:

dpkg -L library
enharmonic
  • 309
  • 2
  • 11
  • 2
    That's right. `dpkg -L` shows the list of files if the package is installed. To examinate it before install use `dpkg --contents library.deb` – andrade Jan 31 '13 at 19:01
  • 5
    dpkg -L takes the package name, not the deb file name. So should be `dpkg -L library` – UpTheCreek Nov 12 '20 at 15:28
  • 1
    to get the package name run `dpkg --info library.deb` it will show next to "Package:" – Omar Apr 13 '21 at 16:29
  • Can you explain what do you mean with _If you are asking where the deb package goes: /var/cache/apt/archives_? - It is confuse because if you get the .deb file through the web into the Downloads directory, it stays there. – Manuel Jordan Nov 18 '22 at 14:26
  • Correct about `dpkg --info library.deb` - it can be declared as `dpkg -I library.deb` too – Manuel Jordan Nov 18 '22 at 14:29
13
dpkg -L <package name>

(Although, since this isn't a programming related question, it should go on superuser.com or linux.stackexchange.com instead of here.)

Bhuvan
  • 161
  • 8
Josh Kelley
  • 1,527
  • 2
  • 15
  • 29
2

Some of the answers have clarified to use dpkg -L library. It is not clear what to specify for "dpkg -L"; package name or deb file name.

Let me consolidate the answer.

  1. Find out the package name from the .deb file

    dpkg --info library.deb

  2. Use the package name found above

    dpkg -L <package name>

Bhuvan
  • 161
  • 8