8

On May 05, 2016, I had removed some packages from my Ubuntu 14.04 desktop. Now I want to make a list of those packages which I had removed on that day. How can I do it using Terminal?

However, I can get these info from Ubuntu Software Center > History > Removals. But I'm wishing to get a plain text file.

1 Answer 1

7

Use this line:

cat /var/log/dpkg.log | grep "2016-05-05" | grep "remove" | grep -v "startup"

And for putting it into a file:

cat /var/log/dpkg.log | grep "2016-05-05" | grep "remove" | grep -V "startup" > removed-files.txt

There are surely multiple and maybe even more elegant ways of doing this, if you point them out I'll add them to my answer here.

1
  • I understand the command looks for files from "2016-05-05" and files containing "remove" but what does grep -v "startup" do?
    – Daryl
    Apr 24, 2023 at 4:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .