Swiped from this StackExchange question:
If you can't uninstall an ancient package from Debian, the package axe for example, because you get the following error message:
install-info: No dir file specified; try --help for more information.
Then here's what you need to do.
- Edit the file /var/lib/dpkg/info/<packagename>.prerm as root, where <packagename> is the name of the package causing problems.
- Comment out lines starting with "install-info"
- Comments in shell scripts start with "#" before any commands
- If the line ends with "\", then you must also comment out the following line.
- Save the file.
- Remove the problem package normally.
- Run the command "update-info-dir" as root.
The reason this is necessary is because Debian switched from an internal install-info script to the external install-info package, and the latter requires a command line option the former didn't use.