On 10/22/26 12:28, Nicolas George wrote:
> Hi. > > Detlef Vollmann (HE12026-10-22):
>> on an old system in a VM I did a 'apt autoremove' and removal >> for a package failed. >> So I tried 'dpkg -r --force-all hddtemp' and it failed with: >> >> old hddtemp package prerm maintainer script subprocess failed with exit >> status 1 >> >> So I did a 'dpkg -P --force-all hddtemp' which according to the >> man page shouldn't run the 'prerm' script, but it still failed >> with the same message. >> >> Is there a package management tool that allows me to remove the >> package anyways? >> >> I could create some dummy script that makes sure the prerm script >> doesn't fail, but I'm curious if there's an "official" way to do it.
> > Start by looking at the prerm script and find out WHY it fails.
Well, I know exactly why it fails and how to fix it. The prerm script calls 'invoke-rc.d' and these days it only uses systemd, but for this (very old) package there only exists an init.d script. So the fix is to provide a no-op hddparm.service. But my question was about a debian package management tool that I can tell to ignore the return value of the prerm script. Detlef