Warning: Do not try this unless you have exhausted all other avenues.
Since apt-get, aptitude etc all internally use the dpkg command, we are going to remove all traces of the package installation from the dpkg database, and con dpkg, apt-get, aptitude etc into thinking the package was never installed.
- The dpkg database is the /var/lib/dpkg/status file. Take a backup of this file. We are going to be messing about with the guts of the dpkg system, and you need the original file in case this procedure goes belly up.
Edit the status file:
sudo gedit /var/lib/dpkg/status
Locate the entry for the postfix package in this file. Each package will typically have an entry like shown below. Delete the whole entry. Note: There should be no packages that depend on this package. If there are, you should remove those packages first, so when you open this file, the package is referenced in only one block, which you will then proceed to remove.
Status: install ok installed
Maintainer: Chris Dekter email@example.com
Depends: python (>= 2.6), python-central (>= 0.6.11), python-kde4, python-qt4, python-qscintilla2, python-xlib
Description: Desktop automation utility
AutoKey is a desktop automation utility for Linux and X11. It allows the
automation of virtually any task by responding to typed abbreviations and
hotkeys. It offers a full-featured GUI that makes it highly accessible for
novices, as well as a scripting interface offering the full flexibility and
power of the Python language.
Python-Version: >= 2.6
Save the file.
- Reboot. There may be cached versions of the file, so a reboot is necessary to ensure everyone reads from this new file.
- Re-install the package.
The only reason I post these instructions is that I had a similar issue recently: The autokey package was in a horribly messed up state (the disk got full in the middle of an install, and entries that should have been written were not), and I finally had to resort to the above steps to reinstall the package. It worked for me, and it should work for you, but you use these instructions at your own risk.
Edit: I should also let you know I used apt-get for the (failed) install and the re-install.