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.
As described in this forum , the solution for linux mint distribution may be summarized as follows:
- 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.
- Use in a terminal the command
dpkg-query -W > installedPackagesto list in the file installedPackages , all the packages currently installed in the system.
- Use the command
grep -Fxvf filesystem.manifest installedPackages > addedPackagesto 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
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 (184.108.40.206-r1-1build1, 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
rpm etc. and get the default that way...