Uninstalling Cloud Agent
Uninstalling Cloud Agent from UI or API
When you uninstall a Cloud Agent using the Cloud Agent user interface or Cloud Agent API, the agent, its asset records, licenses for activated applications, associated data, and assessment findings are removed from the Qualys subscription.
Agents checking into the Qualys Cloud Platform are uninstalled locally from the system (service, Program Files, and Program Data) but keeps the registry entry with agent Host ID (Agent UUID), Activation Key, Customer ID, and other registry keys. This facilitates keeping the same agent personality if an agent is re-installed onto the same asset and supports agent-less tracking for authenticated scans.
Uninstalling the Cloud Agent from the Agent Host
When you uninstall a cloud agent from the host itself using the Uninstall utility, the agent, its license usage, and scan results are still present in the Qualys Cloud Platform subscription.
Uninstalling Cloud Agent locally from the host system (service, Program Files, and Program Data), keeps the registry entry with agent Host ID (Agent UUID), Activation Key, Customer ID, and other registry keys. This facilitates keeping the same agent personality if an agent is re-installed onto the same asset and supports agent-less tracking for authenticated scans.
Following are the uninstallation commands:
For .exe and/or MSI-based installer:
Uninstall.exe Uninstall=True
For MSI based installer:
Msiexec.exe /x CloudAgent_x86.msi
During uninstallation, do not use the Customer ID and Activation Key arguments.
To remove the agent’s asset record, license, and assessment findings from the Qualys Cloud Platform, use the Cloud Agent user interface or Cloud Agent API to uninstall the agent. You can remove the agent data once Cloud Agent is uninstalled locally from the host.
The Uninstall.exe
program must be called from outside the Qualys directories to delete the Qualys directories as part of the uninstallation. Otherwise, the installer stops and exits with an error.
Clean Uninstall
The default uninstall behavior retains the Agent UUID, Customer ID, and Activation Key on the system. This supports two use cases:
- The new agent installation can reuse the existing UUID for the consistent lifecycle of the agent host in Qualys Cloud Platform.
- This also facilitates agent-less tracking when authenticated scanning is enabled, and UUID needs to be preserved.
If you want to remove the Agent UUID, Customer ID, and Activation Key from the system, use the clean uninstall capability of Cloud Agent using the following argument:
Uninstall.exe Uninstall=True Force=True
If you install an agent on a host for which you performed a clean uninstall, it creates a new Agent UUID. This new host can create duplicate records in the Qualys Cloud Platform if the original record is not removed correctly.
Sample Clean Uninstall command:
"%programfiles%\qualys\qualysagent\uninstall.exe" Uninstall=True Force=True