How to remove package that has not been properly installed?

Project:Linux server
Category:support request
Project wiki:Server
Related pages:#28: System

I tried to install iptables-persitent but the configuration phase failed:

Setting up iptables-persistent (0.5.3ubuntu2) ...
FATAL: Could not load /lib/modules/ No such file or directory
dpkg: error processing iptables-persistent (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

but now, I cannot remove it:

# apt-get remove iptables-persitent
Reading package lists... Done
Building dependency tree      
Reading state information... Done
E: Unable to locate package iptables-persitent




Eh? The second try worked!

# apt-get remove iptables-persistent
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 58.4 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 36933 files and directories currently installed.)
Removing iptables-persistent ...
Automatic flushing disabled, use "flush" instead of "stop"
Processing triggers for ureadahead ...


Status:active» fixed


And I notice the typo in the package name only now! :-/


Status:fixed» closed
Related pages:-28: System

Automatically closed -- issue fixed for 2 weeks with no activity.