The easiest way to remove manually the agent on Linux is by stopping and remove service and deleting its files and folder.
Open a new Terminal window and execute the following commands:
- Stop the DWAgent service:
sudo /usr/share/dwagent/native/dwagsvc stop
- Delete the DWAgent service:
sudo /usr/share/dwagent/native/dwagsvc delete
- Remove the DWAgent folder:
sudo rm -r -f /usr/share/dwagent
- Remove the DWAgent file:
sudo rm -f /etc/dwagent
- Restart Linux.
💡 Alternatively, you can create a script file (for example: dwagent_uninstall.sh) that contains all of the above commands and performs the removal of the Agent from the Linux system with one command. Using this method, do the following:
- Create a plain text file and name it for example dwagent_uninstall.sh
- Copy and Paste the following commands into the dwagent_uninstall.sh:
⚠️ If the Agent is not installed in the default location, enter the current installation path instead of “/usr/share/dwagent”.
#!/bin/sh
/usr/share/dwagent/native/dwagsvc stop
/usr/share/dwagent/native/dwagsvc delete
rm -r -f /usr/share/dwagent
rm -f /etc/dwagent
3. Save the file.
4. Execute dwagent_uninstall.sh using the following command:
sudo bash dwagent_uninstall.sh
5. Restart Linux.