How Do I Uninstall the Agent?
Two uninstallation methods are available: one-click uninstallation and manual local uninstallation.
Scenario
- The agent was installed using an incorrect package and you need to uninstall it.
- The agent was installed using incorrect commands and you need to uninstall it.
- If the agent fails to be upgraded, uninstall the agent.
Prerequisites
When you uninstall the agent on the management console, the Agent Status of the server is Online.
Uninstalling the Agent on the Console in One-Click
You can uninstall an HSS agent from the HSS console.
![](https://support.huaweicloud.com/intl/en-us/hss2.0_faq/public_sys-resources/note_3.0-en-us.png)
After the agent is uninstalled from a server, HSS will not provide any protection for the server.
- Log in to the management console.
- In the upper left corner of the page, select a region, click
, and choose Security & Compliance > HSS.
- In the navigation pane, choose .
- In the Operation column of the target server, click Uninstall Agent.
If you need to uninstall agents in batches, you can select servers and click Uninstall Agent above the list.
- In the displayed dialog box, click OK.
In the server list, if Agent Status of the server is Not installed, its agent is successfully uninstalled.
Uninstalling the Agent from the Server
You can manually uninstall an agent on a server when you no longer use HSS or need to reinstall the agent.
![](https://support.huaweicloud.com/intl/en-us/hss2.0_faq/public_sys-resources/note_3.0-en-us.png)
After the agent is uninstalled from the target server, HSS will not provide any protection for the server.
- Uninstalling the Linux agent
- Log in to the server from which you want to uninstall the agent and run the following command to switch to user root:
- Perform the following operations to stop HSS:
- Run the following command to stop the service:
- (Optional) Enter the verification code displayed in the command output. See Figure 1.
- In any directory, run the following command to uninstall the agent:
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 and Debian OSs, or other OSs that support DEB installation, run the dpkg -P hostguard command.
If information similar to the following is displayed, the agent has been successfully uninstalled. If the uninstallation fails, go to the step 3.
Stopping Hostguard... Hostguard stopped Hostguard uninstalled.
- (Optional) If the agent fails to be uninstalled in step 2, perform the following operations to uninstall the agent:
- For OSs that support RPM installation, such as EulerOS, CentOS, and Red Hat,
- Run the following command to delete the installation record:
- Run the following command to check whether there are hostguard processes:
If there are residual processes, run the kill -9 PID command to stop all residual processes.
- Run the following command to check whether the /usr/local/hostguard directory exists:
ll /usr/local/hostguard
If the directory exists, run the rm -rf /usr/local/hostguard command to delete it.
- Run the following command to check whether the /etc/init.d/hostguard file exists:
ll /etc/init.d/hostguard
If the file exists, run the rm -f /etc/init.d/hostguard command to delete the file.
- For OSs that support DEB installation, such as Ubuntu and Debian.
- Run the following command to check whether there are hostguard processes:
If there are residual processes, run the kill -9 PID command to stop all residual processes.
- Run the following command to check whether the /usr/local/hostguard directory exists:
ll /usr/local/hostguard
If the directory exists, run the rm -rf /usr/local/hostguard command to delete it.
- Run the following command to check whether the /etc/init.d/hostguard file exists:
ll /etc/init.d/hostguard
If the file exists, run the rm -f /etc/init.d/hostguard command to delete the file.
- Run the following command to check whether there are hostguard processes:
- For OSs that support RPM installation, such as EulerOS, CentOS, and Red Hat,
- Uninstalling the Windows agent
- (Optional) Disable HSS self-protection.
If HSS self-protection is enabled, disable it before uninstalling the agent, or the uninstallation will fail. For more information, see What Do I Do If HSS Self-Protection Cannot Be Disabled?
- Log in to the server that you want to uninstall the agent.
- Click Start and choose Control Panel > Programs. Then select HostGuard and click Uninstall.
- Alternatively, go to the C:\Program File\HostGuard directory and double-click unins000.exe to uninstall the program.
- If you have created a folder for storing the agent shortcut under the Start menu when installing the agent, you can also choose Start > HostGuard > Uninstall HostGuard to uninstall HostGuard.
- In the Uninstall HostGuard dialog box, click Yes.
- (Optional) Restart the server.
- If you have enabled WTP, you need to restart the server after uninstalling the agent. In the Uninstall HostGuard dialog box, click Yes to restart the server.
- If you have not enabled WTP, you do not need to restart the server. In the Uninstall HostGuard dialog box, click No to skip server restart.
- (Optional) Disable HSS self-protection.
Agent FAQs
- Do I Need to Install the HSS Agent After Purchasing HSS?
- Is the Agent in Conflict with Any Other Security Software?
- How Do I Install the Agent?
- How Do I Uninstall the Agent?
- What Should I Do If Agent Installation Failed?
- How Do I Fix an Abnormal Agent?
- What Is the Default Agent Installation Path?
- How Many CPU and Memory Resources Are Occupied by the Agent When It Performs Scans?
- Do Different HSS Editions Share the Same Agent?
- How Do I View Servers Where No Agents Have Been Installed?
- What Can I Do If the Agent Status Is Still "Not installed" After Installation?
- How Do I Upgrade the Agent?
- What Do I Do If the HSS Upgrade Fails?
- What If I Do Not Upgrade HSS to the New Version?
- What Resources Will Be Accessed by the Agent After It Is Installed on a Server?
- How Do I Use Images to Install Agents in Batches?
- What Do I Do If I Cannot Access the Download Link of the Windows Or Linux Agent?
- What Do I Do If Agent Upgrade Fails and the Message "File replacement failed" Is Displayed?
- What Can I Do If Agents Failed to Be Installed in Batches and a Message Is Displayed Indicating that the Network Is Disconnected?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbotmore