Hello, mint users ~_~
I only used to know 'dpkg --get-selections' command for list of installed or deinstalled packages in my machine. But today I learnt you can use another similar command for the similar result, 'dpkg-query -l'.
I wonder if they are totally the same or not.
I checked what it says on the man pages for each, but I want to know better than my rough guess.
FYI, I paste the manuals
dpkg --set-selections => Set package selections using file read from stdin. This file should be in the format 'package state', where state is one of install, hold, deinstall or purge. Blank lines and comment lines beginning with '#' are also permitted.
dpkg-query -l => List packages matching given pattern. If no package-name-pattern is given, list all packages in /var/lib/dpkg/status, excluding the ones marked as not-installed (i.e. those which have been previously purged). Normal shell wildchars are allowed in package-name-pattern. Please note you will probably have to quote package-name-pattern to prevent the shell from performing filename expansion.
And if they are practically the same, which one do you prefer and for what reason?