2

This question already has an answer here:

How do you revert or reinstall a configuration file in Debian/Ubuntu?

I accidentally overwrote the file /etc/bluetooth/main.conf. Running dpkg -S /etc/bluetooth/main.conf shows that the package bluez provides it, but when I run sudo apt-get install --reinstall bluez, it doesn't get reinstalled.

marked as duplicate by Gilles debian Apr 18 '16 at 21:15

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

6

You should mv the file out of the way:

mv /etc/bluetooth/main.conf /etc/bluetooth/main.conf.old
apt-get -o DPkg::options::=--force-confmiss --reinstall install bluez

I don't know if you can get apt to overwrite an existing config file, that's why you should move it out of the way first.

3

Solution 1

Run the following command, replacing package-name with the name of the package:

sudo apt-get -o Dpkg::Options::="--force-confmiss" install --reinstall package-name

Solution 2

If you have .deb package then go to that directory where package is exist and run,

dpkg -i --force-confmiss package-name.deb

Not the answer you're looking for? Browse other questions tagged or ask your own question.