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'm trying to install a new version of Ubuntu from scratch, but I would like a list of the packages which I manually installed (as opposed to installed as a dependency or that came with the system).

I can get a reasonable approximation on Synaptic by looking at only my Installed (manual) packages and then only looking at those packages not supported by Ubuntu (i.e. all those files without the Ubuntu Unity symbol next to them). However, I cannot seem to get Synaptic to export a list of these packages.

Hence my question is whether it is possible to generate a list of packages that were installed manually via the apt-get install command?

The following do not work:

This question is similar in flavor to other questions that have been asked both on Stack Exchange sites and elsewhere (such as Generating list of manually installed packages and querying individual packages, http://serverfault.com/questions/133681/generating-a-list-of-installed-packages-in-ubuntu, and http://ubuntuforums.org/showthread.php?t=947865&page=2).

David Kalnischkies on http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=727799 gives some perspective as to why pinning down exactly what "manually installed" means is difficult (e.g. do programs which you ran which installed packages count as "manually installed"?). Therefore I have specifically limited this question (unlike the others that I listed) to only invocations of apt-get install.

Edit: How to view a list of packages that were manually installed without their dependancies has a nice idea for using the log files of apt-get to do this. Unfortunately this doesn't keep track of which packages have been removed. And even if I were to simply grep 'apt-get purge' and take the diff of the two lists that I get it still wouldn't account for the edge case that I've installed a package, uninstalled it, and then reinstalled it.

share|improve this question
    
If you are still interested, check out my solution in this answer. –  Jeremie Miserez Jul 6 at 18:50

2 Answers 2

Since no answer using apt has been found, I would suggest going into Synaptic Package Manager, click on the Status button at lower left then click on Installed at upper left to see a list of installed packages.

List from Synaptic of installed packages

Then you can output a list from Synaptic with File | Save Markings As and save the file where you can work with it.

share|improve this answer

I just posted this thought on an earlier page about this, sorry if that's impolite (feel free to remove this if it is) but

  1. go get the "manifest" file for your version of Ubuntu at http://releases.ubuntu.com/ as far as I understand it that lists all packages that are in a stock install.
  2. do apt-mark showmanual to generate a list of all packages apt-mark considers to have been manually installed.
  3. eliminate the dups between that list and the manifest, leaving the packages in the output of apt-mark showmanual that were not part of the stock installation.

Probably this is crude and doesn't deal with the subtlties of what exactly constitutes a "manually installed" package, but to me it looks like a pretty good approximation. Or maybe the Synaptic solution is the best.

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.