25

I ran the following command successfully

dpkg -i library.deb

Where can I find where this file was installed?

3 Answers 3

28

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
5
  • 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, 2013 at 19:01
  • 5
    dpkg -L takes the package name, not the deb file name. So should be dpkg -L library
    – UpTheCreek
    Nov 12, 2020 at 15:28
  • 1
    to get the package name run dpkg --info library.deb it will show next to "Package:"
    – Omar
    Apr 13, 2021 at 16:29
  • 1
    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. Nov 18, 2022 at 14:26
  • Correct about dpkg --info library.deb - it can be declared as dpkg -I library.deb too Nov 18, 2022 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.)

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>

1
  • 2
    If you think other answers should be improved, edit them.
    – gronostaj
    Jan 24, 2023 at 14:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .