Can I forcefully remove a package if it encounters errors during `zypper rm`?

I have a package I installed, and well… it wasn’t working, so I went to the OBS to see what was going on and the package says “unresolvable”.

So I attempted to remove the tirex package from the GEO repo with zypper:

saultdon@d830:~> **sudo zypper rm tirex**
root's password:
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following package is going to be REMOVED:
  tirex 

1 package to remove.
After the operation, 529.4 KiB will be freed.
Continue? [y/n/?] (y): **y**
Removing tirex-20120823_28602-2.2 ..................................................................[error]
Removal of (31544)tirex-20120823_28602-2.2.x86_64(@System) failed:
***Error: Subprocess failed. Error: RPM failed: /etc/init.d/tirex-master: line 30: /lib/init/vars.sh: No such file or directory***
***/etc/init.d/tirex-backend-manager: line 30: /lib/init/vars.sh: No such file or directory***
error: %preun(tirex-20120823_28602-2.2.x86_64) scriptlet failed, exit status 1
error: tirex-20120823_28602-2.2.x86_64: erase failed


Abort, retry, ignore? [a/r/i] (a): **r**
Removing tirex-20120823_28602-2.2 ..................................................................[error]
Removal of (31544)tirex-20120823_28602-2.2.x86_64(@System) failed:
***Error: Subprocess failed. Error: RPM failed: /etc/init.d/tirex-master: line 30: /lib/init/vars.sh: No such file or directory***
***/etc/init.d/tirex-backend-manager: line 30: /lib/init/vars.sh: No such file or directory***
error: %preun(tirex-20120823_28602-2.2.x86_64) scriptlet failed, exit status 1
error: tirex-20120823_28602-2.2.x86_64: erase failed


Abort, retry, ignore? [a/r/i] (a): **i**

Do I need to file a bug with the tirex package maintainer or is there some trick to removing RPMs when they fail during removal?

Hi
Re-install then remove


zypper in -f tirex
zypper rm tirex


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.6-2.10-desktop
up 1 day 1:20, 5 users, load average: 0.28, 0.19, 0.15
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

Seemed easy enough! I tried that and it throws the same error, I think this specific package is fubar’d.

Hi
OK, touch the file it’s looking for and see if that helps;


touch /lib/init/vars.sh
zypper rm tirex
rm /lib/init/vars.sh


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.6-2.10-desktop
up 1 day 1:37, 5 users, load average: 0.01, 0.13, 0.15
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

Thanks Malcolm!

Turns out the entire /lib/init folder didn’t exist, so I had to make that before using touch to create that vars.sh file.

Removed and good to go now.