Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
else
   perror
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
add comment

2 Answers

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

http://www.debian.org/doc/manuals/maint-guide/checkit.en.html

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
add comment

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
add comment

Your Answer

 
discard

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.