I want to save the list of packages that have installed. I figured it might be the best to list all and diff it with the default set.

Edit: Clarification: I don't want to get the list of installed packages that are installed at the moment. Rather I want to get the list of packages that I added since the default install.

  • 1
    duplicate: askubuntu.com/questions/17823/…
    – Rinzwind
    May 3, 2011 at 11:14
  • 2
    You misunderstood my question. I want to get the packages that I installed (without the default selection). So, not the packages that are installed at the moment. May 3, 2011 at 11:25
  • ok! sorry for misunderstanding :) :)
    – Rinzwind
    May 3, 2011 at 11:34

3 Answers 3


Open the ISO CD image file with file-roller and extract the file:


It contains all packages that are installed after the installation.

Just keep in mind that you can also download updates and closed source software during the installation, so you'd have the check for those packages separately.

Ubuntu 12.04

In Ubuntu 12.04 the list is no longer available in a single file. Instead, you you need to unpack two files:

  1. filesystem.manifest
  2. filesystem.manifest-remove

and remove the packages in the latter from the former:

comm -3 <(cat filesystem.manifest | awk '{print $1}' | sort) <(cat filesystem.manifest-remove | sort) > default.txt

You can use this as basis to figure out, what has been added since the install (see this answer for details).

  • I'll wait a little if someone has a better suggestion, but this seems good enough. May 3, 2011 at 11:36


sudo dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n


sudo sed -ne '/^Package: \(.*\)/{s//\1/;h;};/^Installed-Size: \(.*\)/{s//\1/;G;s/\n/ /;p;}' /var/lib/dpkg/status | sort -n


sudo dpkg --get-selections

will list all the packages.

Just re-route the output to a file. The 1st two lines will list it from smallest to largest with the size in front of the package name. The 3rd is in alphabetical order.

  • Hi @Rinzwind , your solution gives me all the packages installed right now as it gives the same no of packages with dpkg -l. But what if I want only those packages, which I installed after Ubuntu installation? I suppose, the number of those packages must be fewer than dpkg -l.
    – ddas
    Jul 7, 2016 at 9:24
  • Have you ever deleted your cache? @ddas if not all your DEBs are in /var/cache/apt/archives/
    – Rinzwind
    Jul 7, 2016 at 13:54

I've extracted package marks for you from default Natty Live-CD http://dl.dropbox.com/u/1399037/default-packages

BTW, after updating from 10.04 -> 10.10 -> 11.04 I've lost ~96 default packages, and after reinstalling them, stability of my Natty system increased

You must log in to answer this question.

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