Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I was trying to get musepack encoder support built into ffmpeg today, and I inadvertently broke a few things but I'm not sure exactly which package I installed which broke them. How can I remove ALL packages I installed today, and start again from scratch more carefully?

I can see a list of them in "Ubuntu Software Center" under today's date in the "History", but I don't want to go through uninstalling them one-by-one, because there are hundreds to do.

share|improve this question

2 Answers 2

up vote 4 down vote accepted

The file /var/log/apt/history.log has what you need. Take a look at the answer: How to reinstall many removed packages at once? it's a more detailed answer.

share|improve this answer
grep -e `date +%Y-%m-%d` /var/log/dpkg.log | awk '/install / {print $4}' | uniq | xargs apt-get -y remove

found on commandlinefu worked fine for me

share|improve this answer
This will remove only packages installed by dpkg, not by apt. – Pilot6 May 30 at 11:33

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.