RE: Debian Reinstall
On 09-May-2001 Ronan O'Sullivan wrote:
> Hi there,
> I am wondering is there anyway to save your current installed
> packages information and when you reinstall for apt or dselect to
> know what packages to install or remove to restore your system to
> the previous state?
>
2 steps:
a)
# dpkg --get-selections|sed -e 's/deinstall$/purge/'|dpkg --set-selections
# apt-get dselect-upgrade # this removes any lingering packages in your list
b)
# dpkg --get-selections|sed -e 's/hold$/install/' > package_list
# copy package_install /somewhere/safe
Then, after the install:
# dpkg --set-selections < package_list
# apt-get dselect-upgrade
The sed call is to ensure that even packages on hold get stored properly.
Reply to: