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

Re: Any way to re-install packages?



On Fri, Sep 13, 2002 at 10:26:32AM +1000, Joyce, Matthew wrote:
> From: Joe Emenaker [mailto:joe@emenaker.com] 
> > Now, it would be nice if there were something like "apt-get reinstall" that
> > would save steps 3 and 4. What would be better is something that would
> > download/install all installed packages of a given category... like
> > "essential" or "important". Even if it was only useful in situations like
> > this, I think that it would be justified.... but there are several other
> > uses as well (like recovering from a possible rootkit attack... where you're
> > not sure that you trust your core binaries).

In that last case, you can't even trust apt-get to get the right
package, nor dpkg to install it faithfully. You really have to boot from
trusted media in that case.

The point's taken, nevertheless.

> apt-get install packagename --reinstall

You can also use the tools in the grep-dctrl package in conjunction with
this:

  grep-status -FStatus ' installed' | \
    grep-dctrl -nsPackage -FEssential yes | \
    xargs apt-get --reinstall install

... for instance, to reinstall all essential packages (untested).
Actually the check that the packages are installed is redundant in this
case, but may be useful as an example.

-- 
Colin Watson                                  [cjwatson@flatline.org.uk]



Reply to: