Is it possible to reverse engineer or have a dry run of a deb package in order to see what files and directories it will deploy and perform other settings modifications? Sort of like list the contents of a tar file without extracting them.

  • 3
    Well, you can simply open the deb file with the archive manager and look at the contents. – user180409 Jun 12 '14 at 17:40
  • 2
    a .deb is an archive, similar to a zip file. When you "install" a .deb, amongst other things, the files are copied from the archive onto the system and are arranged in the archive the same as your file system. So things in package/etc to into /etc. In addition the package may or may not run pre or post install scripts. Some packages are quite simple, others quite complex (the kernel and php for example). You will have to look at the .deb and ask a more specific question. See also packaging.ubuntu.com/html – Panther Jun 12 '14 at 19:07

dpkg --dry-run -i package.deb will show you what will happen, and see this question on server fault.

dpkg -e package.deb will extract the control files.

  • I tried that and it didn't really return much useful info – amphibient Jun 12 '14 at 17:34
  • See the added details. – Tim Jun 12 '14 at 17:44

You can use ar command in the terminal. It can display and extract .deb files. Check the control files also, especially the contents of pre* and post* files, since it holds the commands a deb file (or the dpkg) would execute when the pre installation, extraction or post installation happen.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.