Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can i check a *.deb file is good to install in current system without install it? Is there any way that i can use dpkg or apt-get or other command line tools for this purpose?

Note: I need to do this using command line(no gui or synaptic) and there may have multiple deb files.

if dpkg --check *.deb == True
   dpkg -i *.deb
share|improve this question
dpkg has a --dry-run option, the output of which should tell you want you want by inspection, but without a lot of grep testing I don't think this answers your question by itself. – chronitis Jun 8 '13 at 20:58

You may like the lintian command which checks for common packaging errors. The link below may help you.

share|improve this answer
you can't check deb package directly using debi. – shantanu Jun 9 '13 at 7:20
Thank you for showing me my mistake. I fixed my answer. – Devyn Collier Johnson Jun 9 '13 at 12:15

To see the contents of a .deb file, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo dpkg-deb -c <file_name.deb>

To read the contents of a installed package:

sudo dpkg -L <package_name>

For more info see Debian Help

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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