Ubuntu: Fixing the “Not replacing deleted config file”.

JTS

A recent upgrade to a new Ubuntu server version, caused my dovecote server to not be happy.   Apparently in my haste, I had kept my old configuration files for Dovecot that had several features replaced or depreciated.  I tried removing the package using “apt-get remove dovecot*”, but my config files were still left behind.

I manually deleted the “/etc/dovecot” and attempted to apt-get install “dovecot-imapd”. The packages installed, however for some reason I got several errors complaining that they would NOT replace deleted config file (“not replacing deleted config file” to be precise). I tried remove apt-get removing the files and reinstalling with “force” commands, but it still would not install the new config files.

The solution was to remove the dovecot packages using apt-get and then purge them through “dpgk”.

dpkg -P dovecot-common
dpkg -P dovecot-imapd

I then was able to re-install the dovecot packages from scratch. I’m not sure why the apt-get purge/autoremove did not remove them completely and “dpkg” did, but I was glad to finally have fixed the issue.

About the author

During his twenty-five professional years, Mr. Silva has had experience in nearly every facet of the Information Technology industry. Ranging from advanced data mining / data visualization systems to running multi-state small business IT infrastructures, Mr. Silva has always provided precise and cost-effective strategies to meet any client’s needs. With his tremendous work ethic and “Can-Do” attitude, Mr. Silva has always met every challenge head-on and with intelligent determination. Mr. Silva is also a certified NAUI Advanced/Nitrox Diver, hoping to get a few more wrecks under his belt in the Atlantic.