Debian | Find (and restore) which package contains a file
mouse 1697 · person cloud · link
Last update
2017-08-26
2017
08-26
«dpkg»

You can use the -S or --search option of dpkg:

1
dpkg -S /usr/bin/mc # mc: /usr/bin/mc

to restore the original version of a file:

1
2
3
dpkg -S /etc/nut/ups.conf # nut-server: /etc/nut/ups.conf
rm -f /etc/nut/ups.conf
apt-get install --reinstall -o Dpkg::Options::="--force-confmiss" nut-server