[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian Reinstall



Sean 'Shaleh' Perry wrote:
> 
> 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.

This is very clever and effective. I tried it today and it worked like a
charm to get a good package list for backup and of course purge
deinstalled packages as per a).

BTW, How can I find why a package is on hold?

Thanks again,
Eric



Reply to: