I think this is Ubuntu Vivid specific as none of the existing solutions helps:
- Can I get dpkg to ignore an error returned from a post-installation script?
- Unable to remove package on Debian 7
All solutions I found so far suggest
dpkg --purge --force-all, but this is what I get under Ubuntu Vivid:
% dpkg --purge --force-all modemmanager (Reading database ... 124407 files and directories currently installed.) Removing modemmanager (1.4.0-1) ... invoke-rc.d: unknown initscript, /etc/init.d/modemmanager not found. dpkg: error processing package modemmanager (--purge): subprocess installed pre-removal script returned error exit status 100 invoke-rc.d: unknown initscript, /etc/init.d/modemmanager not found. dpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 100 Errors were encountered while processing: modemmanager