root@kali:~# apt-get remove metasploit-framework
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
metasploit metasploit-framework
0 upgraded, 0 newly installed, 2 to remove and 30 not upgraded.
1 not fully installed or removed.
After this operation, 232 MB disk space will be freed.
Do you want to continue [Y/n]? Y
dpkg: error processing metasploit (--remove):
Package is in a very bad inconsistent state - you should
reinstall it before attempting a removal.
(Reading database ... 255120 files and directories currently installed.)
Removing metasploit-framework ...
dpkg: warning: while removing metasploit-framework, directory '/usr/share/metasploit-framework/data/meterpreter' not empty so not removed
Errors were encountered while processing:
metasploit
E: Sub-process /usr/bin/dpkg returned an error code (1)