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

Re: How do I find out what packages I have currently installed?



On 24-Oct-2001 Kai Sterker wrote:
> Hello everybody,
> 
> I've got a question concerning Debian I found no answer for in the
> manuals; perhaps you can help me:
> 
> Is it possible to see what packages I have installed, so I can
> 
> (a) download all of them in one go and
> (b) reinstall exactly those package after erasing all of my HD
> 

easy as can be:

$ dpkg --get-selections|grep -e '\binstall$' > packages

That file contains the name of every package you have installed.  The magic
grep addition is because the output also lists packages which are not fully
removed and what not.

On the new box (or whereever):

# dpkg --set-selections < packages
# apt-get dselect-upgrade

and it will install everything.  *Warning* only do this on a machine after a
fresh install.  The set-selections command will NOT remove the existing
packages, only add new ones.



Reply to: