Ubuntu – Metasploit problems

14.04command linemetasploitsoftware installation

I've searched the whole internet for an answer and still haven't found one, I decided to uninstall metasploit i typed in the following

$ cd /opt
opt$ ls
google  lol  sublime_text  tor-browser-en  wine-staging metasploit
opt$ cd metasploit
opt/metasploit$ ./uninstall

then normally the uninstallation wizard appeared then when i was going to install it again I get this error

$ sudo apt-get install metasploit
Reading package lists... Done
Building dependency tree       
Reading state information... Done
metasploit is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up metasploit (4.5.2-2013031101-1raring0) ...
/var/lib/dpkg/info/metasploit.postinst: line 20: /opt/metasploit/properties.ini: No such file or directory
dpkg: error processing package metasploit (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
metasploit
E: Sub-process /usr/bin/dpkg returned an error code (1)

so even when i try to start metasploit it won't work

  $ sudo service metasploit start
 /etc/init.d/metasploit: 15: exec: /opt/metasploit/ctlscript.sh: not found

anyone who has experience can help me solve this?

Best Answer

The proper way to uninstall Metasploit is to first stop the Metasploit service by running ./ctlscript.sh.stop , and then type ./uninstall to run the uninstall script from the Metasploit directory.

In your case, you can remove the /opt/metasploit completely by:

sudo rm -rf /opt/metasploit
Related Question