Synaptic package list export - selected only?
I know from reading an other thread someone linked (I think it was magic banana) that synaptic can export a list of installed packages. Does it only pick "selected" packages, or does it include all of the dependencies. Is it possible to only get the selected ones if the second case is true?
For me, a list that includes dependencies is useless. I don't care about dependencies, that is the package manager's problem. I only care about the software I asked the computer to install. If I used a complete list and selected all of the packages, I might have a lot of crap installed that I don't need.
Isn't there some way to just use the list of selected packages to select those packages on a new install and apt-get all of those packages back on to your system? to me that is the most elegant solution (and most future-proof, as DEBs won't be getting obsolete).
From your Debian link:
Or you can use dpkg to list the current package selections (the desired state of either installed or to be installed packages):
dpkg --get-selections
And store the list of software to a file called /backup/package-selections
dpkg --get-selections >/backup/package-selections
You can also find package information in the next directories (you can use mc or other FileManager to browse them):
•/var/lib/apt/lists/*
•/var/lib/dpkg/available: list of available packages from repositories.
•/var/lib/dpkg/status: status of installed (and available) packages. This file contains information about whether a package is marked for removal or not, whether it is installed or not, etc. A package marked reinst-required is broken and requires reinstallation.
Restore installed software
After re-installing base system you can immediately re-install all software. You need dselect:
apt-get install dselect
Then you have to type following command:
dpkg --set-selections
Following the instructions in https://trisquel.info/forum/recommendations-backups-cloning-redistribution#comment-74118 you would export all installed packages.
Well, back to square one. Debian's idea of "selected" and mine were different. For now I'm just putting my packages I ask the computer to install in a text file.
I think the word you're looking for is manually installed (i.e. as opposed to automatically installed, dragged in as a dependency).
http://manpages.ubuntu.com/manpages/trusty/man8/apt-mark.8.html
https://askubuntu.com/questions/195782/how-to-view-a-list-of-packages-that-were-manually-installed-without-their-depend
http://ask.debian.net/questions/how-to-get-a-list-of-manually-installed-packages
https://askubuntu.com/questions/2389/generating-list-of-manually-installed-packages-and-querying-individual-packages
Try
apt-mark showmanual
(Anyway if memory serves me everything on the Trisquel ISO were marked manual).
Well, that makes sense. If only "trisquel" and "trisquel-recommended" (the whole default system depends on them) were marked "manual", you would only need to remove any single package installed by default (hence "trisquel" and/or "trisquel-recommended" as well, by reverse dependency) to then have 'sudo apt-get autoremove' remove the whole system!
Could've been a tad more selective though - maybe by marking manual everything listed as those 2 metapackages' dependencies but not the dependencies of said dependencies......