How can I remove all updates installed after a specific date?

There is an alternative, command line approach to getting installation history.

The package manager apt seems to log everything in /var/log/apt/history.log and /var/log/apt/term.log, including separating everything by datestamps. Both contain similar, usable information but term.log is both more verbose and doesn't explicitly indicate what initiated the operation.

History log

/var/log/apt/history.log stores a concise summary of each apt run. Here's a snippet of mine for a manual installation:

Start-Date: 2014-08-22  17:17:52
Commandline: apt-get install nautilus-dropbox
Install: nautilus-dropbox:amd64 (1.6.1-1), python-gpgme:amd64 (0.3-0ubuntu3, automatic)
End-Date: 2014-08-22  17:19:13

The Commandline: field indicates what triggered the run, and in the case of installations made by the update manager it should look something like:

Commandline: aptdaemon role='role-commit-packages' sender=':1.131'

...and there's your list of packages, sorted by date, method and action (install/upgrade/remove). Note that if you want to to pass these packages back to apt-get remove ...:

  • As mentioned, this completely removes packages rather than reverting them. The information in the logs could certainly be used to look at upgraded packages, though rolling them back is another matter.
  • You'll need to strip out the parentheses, their content and comma separator from the list via your preferred method of text manipulation (e.g. sed, vim etc.). So if I wanted to remove the packages in the snippet above I can use the line relatively directly:

    sudo apt-get remove nautilus-dropbox:amd64 python-gpgme:amd64
    

Terminal log

Generally /var/log/apt/term.log is less conveniently structured but, for the sake of completeness, you can get the same information. Terminal output is delimited by timestamps again, and package installations can be got from lines of the following form:

Selecting previously unselected package nautilus-dropbox.

The following is one way of printing a list of installed packages to the terminal for the entire log:

$ awk '/^Selecting/ {gsub(/\./,""); print $5}' /var/log/apt/term.log

This can be adapted or extended to get installations in a date range.


Note: Unlike Windows, removing an update in Ubuntu will normally uninstall that package/program and will not simply revert (or downgrade) it to the previous version.

You can open Ubuntu Software Center, and click on history

enter image description here

Once you do that, click on updates, and that will show you all the updates that are installed on your system. Once you find out the updates that you need removed, you need to do that manually.

enter image description here

To remove, you can use Synaptic Package Manager. If you don't have it installed you can install it from