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).


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)'
  • wouldn't you need to sort your referenceslist.txt too ? – user9517 supports GoFundMonica 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

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.