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

Manually running install-info --quiet --remove iostream-2.95 gives the following error:

install-info: No dir file specified; try --help for more information.
  • 1
    How would you know if it is ancient or not? – Networker Jul 24 '14 at 14:43
  • 1
    Since potato?!? There's gotta be a special club for this, lol. Are you afraid of just replacing the system? Methinks keeping it upgraded will eventually unravel into more trouble than it is worth. – goldilocks Jul 24 '14 at 14:46
  • @Networker packages.debian.org/search?keywords=libstdc%2B%2B2.10-dev shows nothing, and archive.debian.net/woody/i386/libstdc++2.10-dev shows it. It also shows up in aptitude search ?obsolete – Brian Minton Jul 24 '14 at 14:47
  • 1
    @Networker Also, libstdc++2.10 is ancient. Like a decade and a half. This is looking back into the big bang, debian wise. – goldilocks Jul 24 '14 at 14:49
  • 1
    @goldilocks I think I have a machine that can join your Potato Club. Upgrades on Debian are supposed to work (and mostly do). Of course, you are supposed to remove the obsolete packages... – derobert Jul 24 '14 at 15:05
up vote 3 down vote accepted

I solved it by making my own install-info command and putting it before /usr/bin in $PATH. The script was

#!/bin/sh
/usr/bin/install-info "$@" || true
  • good catch on the "$@" – Brian Minton Jul 25 '14 at 16:59
  • FYI: If you want to make sure Gilles actually sees your comment, you need to @-ping him. You can @-ping an editor, even though the name won't tab-complete. – derobert Jul 25 '14 at 22:05

dpkg used to have its own install-info script which was used in place of the GNU one. An email about the change gives a suggestion for packages (formatting added):

These packages should just drop their info files in /usr/share/info, and call the update-info-dir script if present (postinst and prerm). They could suggest/recommend the info package.

So, what I'd suggest you do is edit (yes, edit) /var/lib/dpkg/info/libstdc++2.10-dev.prerm and comment out the install-info ... line. Do the same for other packages with that failure. Once you're done purging the packages, manually run update-info-dir.

BTW: In the future, after doing a upgrade, you should check the list of obsolete/local packages on your system and purge them if not needed. Otherwise, you wind up with very outdated maintainer scripts left lying around.

I'm new to Linux so that may be terrible advice, but the only thing that worked for me, after trying safer solutions (changing $PATH etc) was to "remove" the old install-info (rename it).

> which install-info
/usr/bin/install-info
> mv /usr/bin/install-info install-info.bak

I guess this forced him to use the new one.

The upgrade went ultra-smooth after this.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.