Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am looking for a one line command that I could use to list all deb packages that are missing from a newly installed system, packages that are installed on a reference system (old one).

share|improve this question

1 Answer 1

First, generate the referencelist.txt with dpkg -l > referencelist.txt on the reference machine.

Then your one-liner looks like:

bash -c 'diff <(dpkg -l|sort) <(sort referencelist.txt)'
share|improve this answer
    
wouldn't you need to sort your referenceslist.txt too ? –  Iain Jun 22 '13 at 20:38
    
... (sort referencelist.txt) ? –  dmourati Jun 22 '13 at 23:09
    
Is it possible to list only the packages that were installed manually and not the dependencies. Quite often we endup having tons on packages that are only dependencies and were not ever installed manually. –  sorin Jun 23 '13 at 14:46
    
Maybe check out debtree collab-maint.alioth.debian.org/debtree –  dmourati Jun 24 '13 at 5:05

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.