Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have allowed the update manager to install a 200 Mib of updates, and I think that these update run my graphics driver into a problem. So, I need a way to remove the updates that have been installed since 30th of may 12 for example (or any other date). If I have to remove them manually (in the case of uninstalling them one by one), you are kindly requested to give me the instructions of how to do that.

share|improve this question

2 Answers 2

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

share|improve this answer
    
thanks.Does it involve any commands on terminal to do so? –  creative Jun 18 '12 at 20:20

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.

share|improve this answer

Your Answer

 
discard

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.