Is it possible to know exactly what are the packages initially installed in Linux Mint? After installing Linux Mint Cinnamon 18.1 64 bits, I have installed other packages that are in the official repositories but unfortunately I don't remember now which ones I have done. Now I am looking for a way to uninstall all the packages that were not initially installed by the distribution.

  • It's not clear if you want to know ahead of time what will be installed, or what has already been installed on a particular system. On Debian-based platforms, packages belonging to the base system will always be installed by default; they will be marked as "required" or "important". Different installers may or may not include additional packages, quietly or as a user option.
    – tripleee
    Jun 18, 2017 at 16:55
  • For example, a full graphical environment is usually selected by installing task-xxx-desktop which pulls in the rest of its packages via dependencies (where xxx could be e.g. gnome). Other distros have different standards and conventions; but since you ask about Mint, which is Debian-based, this should at least get you started (and hopefully inspire you to clarify your question).
    – tripleee
    Jun 18, 2017 at 17:05
  • To simply see what's installed, try dpkg -l.
    – tripleee
    Jun 18, 2017 at 17:06
  • The answer to this varies based on user (system installer) making choices ahead of time or during installation, so I'm not sure it can be answered as-is. Perhaps you could clarify some reasonable restrictions?
    – Jeff Schaller
    Jun 18, 2017 at 17:37
  • Also, there are a bunch of "other Linux distributions " so that could be narrowed down.
    – Jeff Schaller
    Jun 18, 2017 at 17:38

5 Answers 5


As described in this forum , the solution for linux mint distribution may be summarized as follows:

  1. Get the file filesystem.manifest which can be found in the casper folder in the Live Session ISO. This file lists all the packages used to build the linux mint distribution.
  2. Use in a terminal the command dpkg-query -W > installedPackages to list in the file installedPackages , all the packages currently installed in the system.
  3. Use the command grep -Fxvf filesystem.manifest installedPackages > addedPackages to list only the packages added by the system administrator.

We can also use in step 3 :diff -y --suppress-common-lines filesystem.manifest installedPackages > comparePackages

In a similar manner, one can easily imagine a solution for other distributions. We have just to replace the step 1 as needed.


For the RPM based distributions like Ret Hat, Fedora or CentOS, you can use the following command:

$ rpm -qa

For the DPKG based distributions like Ubuntu, Mint or Debian, you can use the command:

$ dpkg -l

You can also filter out the output list from those command piping (|) command as follows:

$ rpm -qa | grep python (if you are interested on python packages).

$ dpkg -l | grep python
  • 2
    This answers a different question, I think -- what packages are installed at the moment; not the default list (if any).
    – Jeff Schaller
    Jun 18, 2017 at 17:36
  • 1
    I think as pointed out by @JeffSchaller, that dpkg -l is not the answer to the question since it gives us the list of all the packages installed in the system ( the ones installed by the system administration in addition to the ones initially provided by the distribution). Jun 18, 2017 at 21:57
  • It's right that dpkg - l just give you the current packages but it will give you a good approach of what you have on top of the default packages for a distribution. The answer to this question is go to the website Linux distro and look for the release documentation for a particular version. Jun 18, 2017 at 23:14

For a Debian or Debian based system (Ubuntu, Mint, etc) you can look at /var/log/apt/history.*

Of course, depending on how old your system is and the logging and log rotation set up you may or may not have complete logs. Here's a snippet from one of mine...

Start-Date: 2017-05-26  20:08:30
Commandline: apt-get install calibre
Requested-By: myusername (1000)
Install: libqt5clucene5:amd64 (5.5.1-3build1, automatic), libqt5svg5:amd64 (5.5.1-2build1, automatic), libqt5test5:amd64 (5.5.1+dfsg-16ubuntu7.2, automatic), libqt5help5:amd64 (5.5.1-3build1, automatic), python-cssutils:amd64 (1.0-4.1, automatic), python-cssselect:amd64 (0.9.1+git90c72b0-1, automatic), libpodofo0.9.3:amd64 (0.9.3-4, automatic), python-pyqt5.qtsvg:amd64 (5.5.1+dfsg-3ubuntu4, automatic), python-pyparsing:amd64 (2.0.3+dfsg1-1ubuntu0.1, automatic), python-apsw:amd64 (, automatic), python-repoze.lru:amd64 (0.6-6, automatic), python-mechanize:amd64 (1:0.2.5-3, automatic), python-pyqt5.qtwebkit:amd64 (5.5.1+dfsg-3ubuntu4, automatic), libchm1:amd64 (2:0.40a-3, automatic), calibre-bin:amd64 (2.55.0+dfsg-1, automatic), python-pyqt5:amd64 (5.5.1+dfsg-3ubuntu4, automatic), python-dateutil:amd64 (2.4.2-1, automatic), calibre:amd64 (2.55.0+dfsg-1), libqt5designer5:amd64 (5.5.1-3build1, automatic), python-cherrypy3:amd64 (3.5.0-2build1, automatic), python-routes:amd64 (2.2-1ubuntu2, automatic), python-markdown:amd64 (2.6.6-1, automatic)
End-Date: 2017-05-26  20:09:30

Of course with any distribution you can spin up a new VM and see what is installed using dpkg, rpm etc. and get the default that way...


you can do dpkg-query -l > installedPackages.txt this creates a lit of all installed packages. but if you want to find out if a package is installed or not, you can do:

aptitude search packagename.. if the package is installed it would be marked as "ii"


I wanted to know the same thing on Ubuntu 22.04.3 and this must be close:

dpkg-query --status | perl -lane 'if(/^Package:/){$p=$F[1]}elsif(/^Priority:/){print "$p: $F[1]"}' | egrep required

based on the answer from triplee

You must log in to answer this question.

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