Page 1 of 1

A Synaptic query

Posted: 31 Jan 2014 23:09
by rolgiati
When I run (as root) the Synaptic package manager, I notice in the File menu an entry "Generate package download script"; good thinks I, as I plan soon to do a complete reinstall soon in the hope of getting rid of some annoying Udev problems.

So I display the Installed packages, select them all, click on the File => Generate... item, give a file name and.....Deception ! All I get is a 10 bytes files that contains one line of text:"#!/bin/sh".

A very short script, what !

Is the "Generate..." item supposed/known to work ?

Re: A Synaptic query

Posted: 02 Feb 2014 17:30
by zerozero
i never used it (so take the info with a gain of salt) but these pages seem to cover what you are asking
https://help.ubuntu.com/community/Synap ... loadScript
http://karthikeyan2u.blogspot.co.uk/201 ... cript.html

Re: A Synaptic query

Posted: 02 Feb 2014 19:03
by rolgiati
Thanks for the reply; from the links I can see that, even if it did work, it does not do what I hoped it would ;-3(

Re: A Synaptic query

Posted: 02 Feb 2014 23:23
by kobros
..... I plan soon to do a complete reinstall soon in the hope of getting rid of some annoying Udev problems.
There's a much easier method:

If you want to do a re-installation and you want that new installation to reflect your current installation (but with new, fresh, unaltered config files) then you can export a text-list (list_packages.txt, or your choice of name for that .txt file) of your currently installed packages and use that same text-list to bring your new installation "up-to-date", using the following dpkg commands (as root):

Code: Select all

  # dpkg --get-selections >list_packages.txt
and after you re-installed and have rebooted into the new installation, issue the next command. Of course you may edit the packages-list before issuing this command, to exclude some packages that you do not want to be installed.

Code: Select all

  # dpkg --set-selections <list_packages.txt
Apt will ignore all packages in the list that are already installed and will install only those that are not installed yet.

Re: A Synaptic query

Posted: 03 Feb 2014 11:38
by rolgiati
Absolutely perfect for what I wanted to do.

As I use a separate partition for /home (which I only mount after an install is done) and where I also keep copies of /etc and /root to avoid having to re-configure various things like /etc/hosts or /etc/network/interface, I will save there the list package file.

You, Sir, have my eternal gratitude for at least fifteen minutes ;-3)

Re: A Synaptic query

Posted: 03 Feb 2014 12:19
by GeneC
kobros wrote:
..... I plan soon to do a complete reinstall soon in the hope of getting rid of some annoying Udev problems.
There's a much easier method:

If you want to do a re-installation and you want that new installation to reflect your current installation (but with new, fresh, unaltered config files) then you can export a text-list (list_packages.txt, or your choice of name for that .txt file) of your currently installed packages and use that same text-list to bring your new installation "up-to-date", using the following dpkg commands (as root):

Code: Select all

  # dpkg --get-selections >list_packages.txt
and after you re-installed and have rebooted into the new installation, issue the next command. Of course you may edit the packages-list before issuing this command, to exclude some packages that you do not want to be installed.

Code: Select all

  # dpkg --set-selections <list_packages.txt
Apt will ignore all packages in the list that are already installed and will install only those that are not installed yet.
Its always a good day when you learn a new very useful linux procedure. Thanks for this, kobros.. :)

Re: A Synaptic query

Posted: 03 Feb 2014 16:07
by kobros
ThereĀ“s a catch to this (it doesn't cover all the angles...)

Anything you have installed (in your old installation) that is not currently available from the repositories in your sources.list will not be installed in the 'import' (second) step. For instance: save your self-compiled .debs somewhere before you do a re-installation.

Re: A Synaptic query

Posted: 03 Feb 2014 16:24
by GeneC
^ Noted (and expected that it would not install anything not in the default repos)... ;)