How To: Uninstall ConnectSecure Scan Agent

How To: Uninstall ConnectSecure Scan Agent

This page covers how to uninstall the ConnectSecure Vulnerability Scan Agent and the various methods supported.


Method 1 - Uninstall from ConnectSecure Portal

This method does not require the agent uninstallation secret

Click here to see the interactive demo:https://app.storylane.io/share/5kbjbfrwkglk

Instructions to uninstall from the web portal:

  1. Login to the ConnectSecure portal (portal.myconnectsecure.com)

  2. Select Global or Company

  3. Tap on the Overview > Agents menu, then choose your Probe or Lightweight Agent option

  4. Tap the three-dot action menu and choose Uninstall

image-20240320-175750.png
image-20240320-175852.png

The agent must be online in order to get the uninstall command successfully

Uninstalling the agent does not remove the agent/asset details from the portal; it simply removes the agent from the endpoint so it’s no longer communicating, scanning, or updating. To fully remove the agent and the data, use the Delete option.


Method 2 - Uninstall from Add/Remove Programs (Windows OS only)

This method does not require the agent uninstallation secret; any administrator can remove software from add/remove programs or installed app as usual.

  1. Access the Add/Remove Programs from Windows Control Panel

image-20260302-180957.png
  1. Click the agent name and use the Uninstall button to complete the removal

image-20260302-181110.png

Or you can use the Windows Settings > Apps > Installed apps and use the three-dot menu to uninstall the app labeled ConnectSecure Vulnerability Scan Agent.

image-20260302-181244.png

Method 3 - Uninstall from Command Prompt, RMM, Scripting

NOTE: These changes are deploying March 5th and will be optional until April 2nd

Using this method requires the Agent Uninstallation Secret be provided in the uninstall script, otherwise the uninstallation will fail.

This prevents unauthorized removal of the ConnectSecure agent from the command line.

To obtain your uninstallation secret, please navigate to Company Settings > Agent Uninstallation Secret

image-20260303-015631.png

The secret is generated based on the Company ID + Tenant ID

The secret value needs to be added to the end of your uninstallation command(s).

See below for instructions on using the uninstall command with the required secret value.

Windows Uninstall Commands

  1. Open the command prompt as administrator

  2. Navigate to the installed agent directory; by default it’s

    • C:\ProgramFiles(X86)\CyberCNSAgent

  3. Execute the ./cybercnsagent.exe -r command from this directory

You must include your Agent Uninstallation Secret after the -r -y command switch

Example → ./cybercnsagent.exe -r -y <uninstall_secret>

cd "C:\Program Files (x86)\CyberCNSAgent" cybercnsagent.exe -r -y <uninstall_secret>

This should completely remove the agent application and all services.


MAC Uninstall Commands

You must be in the agent installation directory path

Open the terminal as sudo

>> cd /opt/CyberCNSAgent/ >> ./cybercnsagent_darwin -r -y <uninstall_secret>

Alternatively you can use this method

sudo chmod +x uninstallAgent.sh sudo ./uninstallAgent.sh <uninstall_secret>

In some cases when troubleshooting failed agent removals, we run a series of commands

sudo launchctl unload /Library/LaunchDaemons/com.CyberCNSAgent.AgentService.plist; sudo rm /Library/LaunchDaemons/com.CyberCNSAgent.AgentService.plist;
 sudo rm -rf /opt/CyberCNSAgent;

 


Linux Uninstall Commands

Uninstallation Steps for Linux (Probe & Lightweight Agent)

  1. Browse to the CyberCNSAgent installation directory

       >>cd /opt/CyberCNSAgent/
  1. Run the uninstall command

       >>./cybercnsagent_linux -r -y <uninstall_secret>

Uninstall.bat Command

The uninstall.bat can be called using the <uninstall_secret>

You can call the uninstall.bat file from the CyberCNSAgent directory, but you still need to pass the <uninstall_secret> value behind the command. See below for instructions.

  • Open PowerShell as Administrator.

  • Navigate to the agent installation directory

cd "C:\Program Files (x86)\CyberCNSAgent"
  • Run the following command:

.\uninstall.bat  <uninstall_secret>

Example:

image-20260225-201308.png

Need Support?

Do you need help? You can access our support portal anytime to create, view, and update tickets.

https://cybercns.freshdesk.com

Click below to be directed to our secure support portal or email support@cybercns.com to open a ticket.

image-20231229-202028.png