Article View: linux.debian.user
Article #248Re: How to remove a package for which prerm fails
From: Detlef Vollmann
Date: Thu, 22 Oct 2026 13:10
Date: Thu, 22 Oct 2026 13:10
33 lines
3095 bytes
3095 bytes
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
Technical Details
Message-ID:
<NR0Iq-7bEo-1@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.samoylyk.net!gothmog.csi.it!news.servidellagleba.it!bofh.it!news.nic.it!robomodReferences:
<NQXhv-79Iz-3@gated-at.bofh.it> <NQYdz-7adz-1@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.samoylyk.net!gothmog.csi.it!news.servidellagleba.it!bofh.it!news.nic.it!robomod From: Detlef Vollmann <dv@vollmann.ch> Newsgroups: linux.debian.user Subject: Re: How to remove a package for which prerm fails Date: Thu, 22 Oct 2026 15:10:02 +0200 Message-ID: <NR0Iq-7bEo-1@gated-at.bofh.it> References: <NQXhv-79Iz-3@gated-at.bofh.it> <NQYdz-7adz-1@gated-at.bofh.it> X-Original-To: debian-user@lists.debian.org X-Mailbox-Line: From debian-user-request@lists.debian.org Thu Oct 22 12:59:56 2026 Old-Return-Path: <dv@vollmann.ch> X-Amavis-Spam-Status: No, score=-1.9 tagged_above=-10000 required=5.3 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no X-Policyd-Weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .vollmann. - helo: .mxout024.mail.hostpoint. - helo-domain: .hostpoint.) FROM/MX_MATCHES_NOT_HELO(DOMAIN)=0; rate: -3.5 X-Authenticated-Sender-ID: mail-all@vollmann.ch MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailing-List: <debian-user@lists.debian.org> archive/latest/832556 List-ID: <debian-user.lists.debian.org> List-URL: <https://lists.debian.org/debian-user/> List-Archive: https://lists.debian.org/msgid-search/9cf24ec2-898b-4e17-9ca4-4ab2ae834937@vollmann.ch Approved: robomod@news.nic.it Lines: 33 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Thu, 22 Oct 2026 14:59:41 +0200 X-Original-Message-ID: <9cf24ec2-898b-4e17-9ca4-4ab2ae834937@vollmann.ch> X-Original-References: <de115df3-bf0d-4084-83bf-3c7d0acec9ba@vollmann.ch> <atnlXQk1XgfNq4BI@phare.normalesup.org>