Synaptic package list export - selected only?

6 respostas [Última entrada]
evoblade
Desconectado
Joined: 10/25/2015

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.

evoblade
Desconectado
Joined: 10/25/2015

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

Magic Banana

I am a member!

I am a translator!

Desconectado
Joined: 07/24/2010

Following the instructions in https://trisquel.info/forum/recommendations-backups-cloning-redistribution#comment-74118 you would export all installed packages.

evoblade
Desconectado
Joined: 10/25/2015

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.

davidnotcoulthard (non verificado)
davidnotcoulthard
Magic Banana

I am a member!

I am a translator!

Desconectado
Joined: 07/24/2010

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!

davidnotcoulthard (non verificado)
davidnotcoulthard

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......