# Error message when uninstalling Oneagent

**URL:** <https://community.dynatrace.com/t/error-message-when-uninstalling-oneagent/23052>\
**Category:** Open Q&A\
**Tags:** installation, oneagent\
**Created:** [February 20, 2020, 9:56am UTC](https://community.dynatrace.com/t/error-message-when-uninstalling-oneagent/23052 "2020-02-20T09:56:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shirai](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/shirai/32/27711_2.png) [@Shirai](https://community.dynatrace.com/u/Shirai)\
**Post date:** [February 20, 2020, 9:56am UTC](https://community.dynatrace.com/t/error-message-when-uninstalling-oneagent/23052/1 "2020-02-20T09:56:47Z")

</div>

An error message was displayed when uninstalling Oneagent Linux.

Confirmed that “semanage” is not installed.

Is the uninstallation successful?

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

[root@ket-bat11 agent]# /home/dynatrace/agentuninstall.sh/uninstall.sh

16:55:05 Checking root privileges…

16:55:05 OK

16:55:05 Removing entries for preloading

16:55:05 Using SysV to stop the agent

16:55:12 Removing Dynatrace OneAgent from autostart

16:55:12 Removing oneagent from /etc/init.d

16:55:12 Removing oneagentproc from system folders

16:55:12 Removing oneagentproc from /lib

16:55:12 Removing oneagentproc from /lib64

16:55:12 Cleaning up /opt/dynatrace/oneagent/agent. Part of configuration preserved in /var/lib/dynatrace/oneagent

**/home/dynatrace/agent/uninstall.sh: line 465: semanage: Command not found**

16:55:12 Removing Dynatrace SELinux policies.

16:55:14 Uninstallation finished successfully

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

---

<div class="post-metadata">

**Author:** ![skrystosik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/skrystosik/32/21133_2.png) [@skrystosik](https://community.dynatrace.com/u/skrystosik)\
**Post date:** [February 20, 2020, 10:05am UTC](https://community.dynatrace.com/t/error-message-when-uninstalling-oneagent/23052/2 "2020-02-20T10:05:14Z")

</div>

If script reached it’s end (it is, you see it in last line) in general everything should be uninstalled properly.

Sebastian

---

<div class="post-metadata">

**Author:** ![bartosz\_pollok](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/bartosz_pollok/32/24591_2.png) [@bartosz\_pollok](https://community.dynatrace.com/u/bartosz_pollok)\
**Post date:** [February 20, 2020, 10:12am UTC](https://community.dynatrace.com/t/error-message-when-uninstalling-oneagent/23052/3 "2020-02-20T10:12:12Z")

</div>

Hello Toshimasa,

The OneAgent uninstallation is indeed finished, but due to the error you see in the output, i.e. lack of **semanage** utility on your host, the uninstall script wasn’t able to remove SELinux context for your custom-path OneAgent installation.

The last thing to complete the uninstall in this case is to install **semanage** utility onto your host and use it to remove OneAgent contexts manually. You can find out how to do that using semanage docs (e.g. execute _man semanage_ on your machine).

Regards,

Bartek
