LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora - Installation (https://www.linuxquestions.org/questions/fedora-installation-39/)
-   -   Unable to uninstall broken package - anyone dealt successfuly with that? (https://www.linuxquestions.org/questions/fedora-installation-39/unable-to-uninstall-broken-package-anyone-dealt-successfuly-with-that-271499/)

karel2005 12-29-2004 07:49 AM

Unable to uninstall broken package - anyone dealt successfuly with that?
 
Hi all,

I am semi-newbie but have done a complete newbie error that caused me trouble I can't handle now. I use FC2. As I needed to scan some files for viruses, I tried to install Antivir (antivir.de free home edition) from a package downloaded manually. However, I downloaded Suse package and as it wouldn't install properly, I installed it forcebly.

Now, I have a broken package installed and can not uninstall it. Synaptic refuses to manipulate any other packages unless it uninstalls the broken antivir, but at the same time it doesn't manage to do so and the package keeps apearing in Synaptic package listing.

When trying to uninstall manually, it gives me following report

----------------------------------------------------------
[root@private-ws-192 Texts]# rpm -e antivir
/etc/init.d/avguard: line 73: /etc/rc.status: is neither file nor directory.
error: %preun(antivir-2.1.0-20) scriptlet failed, exit status 1
-----------------------------------------------------------

I googled a lot but found nothing that would help

anyone can help? Thanks 1000!

karel

/bin/bash 12-30-2004 04:28 AM

Try this:
touch /etc/rc.status

karel2005 12-30-2004 07:08 AM

Thanks /bin/bash

I tried and it obviously had some effect, but another error/s emerged:

[root@private-ws-192 Texts]# rpm -e antivir
/etc/init.d/avguard: line 73: /etc/rc.status: není souborem ani adresářem
error: %preun(antivir-2.1.0-20) scriptlet failed, exit status 1
[root@private-ws-192 Texts]# touch /etc/rc.status
[root@private-ws-192 Texts]# rpm -e antivir
/etc/init.d/avguard: line 76: rc_reset: command not found
/etc/init.d/avguard: line 123: rc_status: command not found
/etc/init.d/avguard: line 126: rc_status: command not found
/etc/init.d/avguard: line 159: rc_exit: command not found
error: %preun(antivir-2.1.0-20) scriptlet failed, exit status 127

thanks

karel

/bin/bash 12-31-2004 04:02 AM

OK that answers that question. I thought it was trying to remove the file but it's actually wanting to run the script, which is a suse script, which is why you don't have it.

This will give you a list of files installed by the package.
rpm -ql <package>

Then you can remove the files manually and do an rpm rebuild-database (I don't remember the exact command but it is in man rpm)

Before you remove the files make a list so you can undo anything which may break your system.

<edit> I almost forgot, first try this:

rpm -e --noscripts <package> #Do not execute pre- and post-uninstall scripts

If that doesn't work then try the above as a last resort.

karel2005 01-03-2005 07:33 AM

Many thanks /bin/bash !

"rpm -e --noscripts" worked

Its great help!

Karel


All times are GMT -5. The time now is 09:26 AM.