I'm running sid, and in the course of trying to cross-grade my system from i386 to amd64 I came across some ancient packages that I couldn't remove. Some background: I've had this system since potato, or maybe earlier.
There are about a hundred packages like this, so I'd like a generic or scriptable answer. Here's one example:
bminton:/var/cache/apt/archives# dpkg --purge libstdc++2.10-dev (Reading database ... 1352516 files and directories currently installed.) Removing libstdc++2.10-dev (1:2.95.4-27) ... install-info: No dir file specified; try --help for more information. dpkg: error processing package libstdc++2.10-dev (--purge): subprocess installed pre-removal script returned error exit status 1 Errors were encountered while processing: libstdc++2.10-dev
The prerm script `/var/lib/dpkg/info/libstdc++2.10-dev.prerm script contains the following:
#! /bin/sh -e install-info --quiet --remove iostream-2.95
install-info --quiet --remove iostream-2.95 gives the following error:
install-info: No dir file specified; try --help for more information.