Updated on 2024-01-16 GMT+08:00

Uninstalling an Agent

If you no longer need to use HSS, uninstall the agent by following the instructions provided in this section. If the agent is uninstalled, HSS will stop protecting your servers and detecting risks.

Uninstallation Methods

Uninstallation Mode

Description

Uninstall the Online Agents

If the agent status of a server is Online, uninstall the agent by referring to Uninstalling the Online Agents.

Uninstall the Offline Agents

If the agent status of a server is Offline, uninstall the agent by referring to Uninstall an Offline Agent.

Uninstalling the Online Agents

  1. Log in to the management console.
  2. In the upper left corner of the page, select a region, click , and choose Security & Compliance > HSS.
  3. In the navigation pane, choose Installation & Configuration. Click the Agents tab.

    If your servers are managed by enterprise projects, you can select an enterprise project to view or operate the asset and scan information.

  4. Click the value of Servers with Agents to view the list of servers where the agent has been installed. For details, see Online agent parameters.

    Figure 1 Viewing the online agent list
    Table 1 Online agent parameters

    Parameter

    Description

    Server Name/ID

    Server name and ID

    IP Address

    EIP or private IP address of a server

    OS

    Server OS. Its value can be:

    • Linux
    • Windows

    Agent Status

    Agent status of a server. Its value can be:

    • Online

    Agent Version

    Version of the agent installed on the target server.

    Agent Upgrade Status

    The agent upgrade status.

  5. Click Uninstall Agent in the Operation column of a server. In the dialog box that is displayed, confirm the uninstallation information and click OK.

    If you need to uninstall the agent in batches, you can select servers and click Uninstall Agent above the list.

Uninstall an Offline Agent

  • Linux
    1. Remotely log in to the Linux server where the agent is to be uninstalled.
    2. If the agent has been installed, run the following command to uninstall it:
      1. Do not run the uninstallation command in the /usr/local/hostguard/ directory. You can run the uninstallation command in any other directory.
      • For EulerOS, CentOS, and Red Hat, or other OSs that support RPM installation, run the rpm -e hostguard; command.
      • For Ubuntu, Debian, and other OSs that support DEB installation, run the dpkg -P hostguard; command.
    3. Verify the uninstallation. If the /usr/local/hostguard/ directory is not found on the Linux server, the agent has been uninstalled.
  • Windows
    1. Remotely log in to the Windows server where the agent is to be uninstalled.
    2. Go to C:\Program File\HostGuard on the Windows server.
    1. Double-click the unins000.exe file to uninstall the agent.
    2. In the HostGuard Uninstall dialog box, click Yes to delete HostGuard and all its components.
    3. (Optional) Restart the server.
      • If you have enabled WTP, you need to restart the server after uninstalling the agent. In the HostGuard Uninstall dialog box, click Yes to restart the server.
      • If you have not enabled WTP, you do not need to restart the server. In the HostGuard Uninstall dialog box, click No to skip server restart.
    4. If the C:\Program Files\HostGuard directory does not exist on the Windows server, the agent has been uninstalled.

Related Operations

Installing an Agent