The question unix.SE/3595 asks how to list packages that I explicitly installed. By explicit it means, packages that I choose, not including anything installed by default, or pulled in by the dependencies.

Is there a similar command to find packages that were explicitly removed?


The following command will list all packages which have ever been removed (or purged), as far back as apt's history allows:

zgrep -E '^(Remove:|Purge)' /var/log/apt/history.log*

This does not distinguish automatic removals from explicit removals, but with a little work you should be able to reconstruct that information.

If you always use the command line, then

zgrep -E ^Commandline /var/log/apt/history.log*

will show you all the commands you issued, which will include explicit removals. You could filter it to only list remove or purge, but that won't include other forms of removals.

If you remove packages using dpkg, that won't appear in apt's logs; you'd need to look at /var/log/dpkg.log and search for remove or purge.

| improve this answer | |

I don't know a way to do this using apt, but you may try searching your bash history:

grep 'apt-get .*remove' ~/.bash_history

This should output all lines with remove or autoremove.

| improve this answer | |

There should be logs located at /var/log/apt/history.log that contain your past actions with apt.

| improve this answer | |

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.