apt-getsubsequently refused to reinstall those files. I eventually resolved by using
I had initially followed the installation steps for Moin Moin on the Ubuntu Server Guide. So I had installed by doing
$ sudo apt-get install python-moinmoinSo to uninstall, I did
$ sudo apt-get remove python-moinmoinI now know that that did not uninstall a base package,
moinmoin-common, on which it depends. But I didn't notice that at first. All I saw was that some configuration files were still present in
/etc/moin, so I
And there began my trouble, because thereafter I could not get
apt-getto delete or reinstall the configuration files to that dir.
I did various iterations of
apt-get purgefor the
python-moinmoinpackages. But the remove operations never removed
/etc/moinand the installs never installed the missing files.
dpkg-debto inspect the moinmoin-common archive file in
/var/cache/apt/archives. I could see the to files I wanted were in the archive. But I could not get them to unpack to
A temporary workaround was to use
dpkg-debto extract the archive file to
/tmp, which unpacked everything, and then manually copy the uninstallable files from there to
/etc/moin. But I wanted to find the proper solution.
I found a thread on the Ubuntu Forums outlining an equivalent problem with an apache2 installation. The advice there was to use Synaptic to remove the package. I don't have that option as I am running a headless server and Synaptic is a GUI tool. But at least there was the suggestion of a solution. If it can be done in a Debian/Ubuntu GUI, then be sure it can be done on the command line too.
Then I found a good article at Linux.com which explained how you can escalate from
dpkgto resolve package management problems.
So the happy ending was to do
$ sudo dpkg --purge moinmoin-commonThis removed the troublesome files and the references to them that the package manager was evidently keeping. After that, I was able to cleanly reinstall Moin Moin.