Sometimes you're trying to install or uninstall a package, but the process aborts, because the installation script fails. I think there was an option in apt-get or dpkg to override this behavior, but for now there's a very simple workaround that will usually help:
Insert a line "exit 0" into the script causing the error. (It then exits "without an error" right away.) At least in init scripts during deinstallation this should not cause too much damage. In my example, the packet tspc failed during upgrade from hardy to intrepid (release candidate).
There were a few packets that didn't upgrade cleanly, about 5 I think. But now everything works pretty well.