6

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, https://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.

1
  • If you are still interested, check out my solution in this answer.
    – jmiserez
    Jul 6, 2014 at 18:50

2 Answers 2

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 (manual) 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.

1
  • 1
    I like the simplicity of this solution. It deserves to be acknowledged at par with any other cool CLI-based solution! One correction though, OP asked for the list of all manually installed packages, so in the LHS panel, Installed (manual) must be selected before saving the markings. Kudos for a simple & elegant approach! :)
    – Amar
    Jul 11, 2015 at 7:40
0

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.

You must log in to answer this question.

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