Uninstall command for insightVM agent

Just need to know what the command is to uninstall the InsightVM agent and does it have run on the directory the agent is in.

Yes. I am wondering if there’s a script to do mass agent uninstallation in Windows.

Have you tried downloading the agent then running needed command (extract the zip to get to the files)

Windows
msiexec /x agentInstaller-x86_64.msi

Linux
sudo ./agent_installer-x86_64.sh uninstall

you could use ansible or powershell to upload then execute the command needed

Thanks @rrdias. I have already deployed the installer via Ansible. However, I need to remove the agent from a number of servers and I was wondering if there’s a script to do that. the only information is to manually remove / uninstall the agent : Agent Controls | Insight Agent Documentation

To do that manually, one has to: Browse to the “Rapid7 Insight Agent” from your Start menu, right click the agent icon, and select “Uninstall”. You can also run the installer and select the Remove option.

@luggyd sorry for not being clear. the documentation does have the uninstall option

I have used ansible to remove the agent using the installer. It’s as simple as uploading the installer, making sure it has the correct permissions and running the command. last task is deleting the installer.

task 1
upload the installer directory (from unzipping the file from rapid 7) set permissions to allow execution

task 2
run the installer with the uninstall command

task3
delete the installer directory

option task 4
you can have a sanity check to se if the rapid7 ir_agent directory exists

Ah thanks @rrdias. I will give it a try. Thanks :slight_smile: