PDA

View Full Version : apt database is stuck with libreoffice package - can't install anything



landersohn
December 9th, 2012, 02:53 AM
Please help, I have a big problem!
At some point I installed libreoffice 3.6.0 and later updagreded to 3.6.4. Problem is, there are two language packages left from 3.6.0 (es and fr) which I tried to remove using synaptic.
The removal failed with a post-removal script error. Now I am stuck:
the packages are marked for removal, unmarking thoses in synaptic didn't work and I can not install anything else because any install operation tries to remove these packages first which fails. using "-f" didn't help.

Does anybody know how I can get rid of these packages or at least unmark for removal?

Thanks

LuisGMarine
December 9th, 2012, 03:14 AM
You can try these:


sudo apt-get clean
sudo apt-get autoclean

NightsShadeQueen
December 9th, 2012, 03:48 AM
If that doesn't work, try


sudo dpkg --remove --force-remove-reinstreq PACKAGENAME

This will *not* remove any dependents, though

?

phoenixstew49
December 9th, 2012, 03:49 AM
Should the solution given above not work:


sudo apt-get clean
sudo apt-get autocleanThis slightly dirty trick (from http://blog.bodhizazen.net/linux/apt-get-how-to-fix-very-broken-packages/) may provide the solution. I've adapted it to your package:


sudo rm /var/lib/dpkg/info/libreoffice-l10n-fr.* /var/lib/dpkg/info/libreoffice-l10n-es.*
sudo dpkg --remove --force-remove-reinstreq libreoffice-l10n-fr
sudo dpkg --remove --force-remove-reinstreq libreoffice-l10n-es

landersohn
December 9th, 2012, 01:57 PM
Thank you all. The clean autoclean didn't work. I'll try the "dirty" trick.
I got halfway there by editing /var/lib/dpkg/status manually and changing the status of these packgages. I still get errors but at least I can install other stuff.

landersohn
December 9th, 2012, 03:18 PM
Thanks, the "dirty" trick worked like a charm.