Server Fault is a question and answer site for system and network administrators. 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

I have an ubuntu box and I want to get/log all changes to the packaging system (apt/dpkg) so I can reproduce them on an other machine.

My goal is to extract an update script to reproduce the same configuration on a different machine.

So I either want the executed commands or the following information:

  • order of changes
  • package name
  • version
  • modification (install, remove, reconfigure etc.)
  • parameters used
share|improve this question

migrated from Sep 28 '11 at 10:39

This question came from our site for professional and enthusiast programmers.

up vote 1 down vote accepted

It is already there. Look into /var/log/apt/history.log* and you see all you need.

But if you want to see all installed packages you can look into dpkg --get-selections. To replay these selections you can use dpkg --get-selections. More information about that can be found with man dpkg.

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.