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

Re: apt-get reinstall all



> I was just thinking that it would be great to have something in apt-get
> that get 'reinstall' or 'repaire' all packages installed on the system.
> I don't think I am the only one who rm *'s a wrong dir sometimes, ;)
> I think it's now real hard to reinstall every package installed ...

well, if you rm'ed /usr/share p.e. just run
apt-get --reinstall install `dpkg -S /usr/share | sed -e 's/,//g' -e 's/:.*$//'`

if you want to reinstall all installed software, i'd try something like
apt-get --reinstall `dpkg --get-selections | grep install | grep -v deinstall | cut -d' ' -f1`

Shell scripting is great ;)

Greetings,
Erich



Reply to: