The Computer Oracle

How do I list the files installed by a deb package?

--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Magical Minnie Puzzles

--

Chapters
00:00 How Do I List The Files Installed By A Deb Package?
00:23 Accepted Answer Score 14
00:46 Answer 2 Score 2
01:03 Answer 3 Score 3
01:44 Thank you

--

Full question
https://superuser.com/questions/454849/h...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#linux #ubuntu #aptget

#avk47



ACCEPTED ANSWER

Score 14


Yes, use the dpkg command like

dpkg -L hadoop-0.20

The converse question (finding the package providing a given file) is answered with e.g.

dpkg -S /usr/include/gc/gc.h

Read more about Debian packaging related tools.

P.S. Ubuntu (and other Linux distributions, e.g Mint) is a derivative of Debian.




ANSWER 2

Score 3


What files are installed on your system varies from package to package. To be 100% sure you should take a look into the .deb package yourself. Download the package first.

First you need to extract the .deb archive:

ar vx mypackage.deb

Now this should result in three new files: debian-binary, control.tar.gz and data.tar.gz. You're interested in the last one.

Now you can extract it as well using tar:

tar xzvf data.tar.gz

Now you can browse the package content freely. Look for any makefiles, install scripts and such like to see where things gets installed.




ANSWER 3

Score 2


You can list the installed files for a package by passing the --listfile flag to dpkg. For example, if your package is actually named "hadoop-0.20" then:

dpkg --listfiles hadoop-0.20