# deployment.conf file for Linux Hosts - Preserving after uninstall?

**URL:** <https://community.dynatrace.com/t/deployment-conf-file-for-linux-hosts-preserving-after-uninstall/40435>\
**Category:** Open Q&A\
**Tags:** oneagent\
**Created:** [June 28, 2023, 5:02pm UTC](https://community.dynatrace.com/t/deployment-conf-file-for-linux-hosts-preserving-after-uninstall/40435 "2023-06-28T17:02:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sivart\_89](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@sivart\_89](https://community.dynatrace.com/u/sivart_89)\
**Post date:** [June 28, 2023, 5:02pm UTC](https://community.dynatrace.com/t/deployment-conf-file-for-linux-hosts-preserving-after-uninstall/40435/1 "2023-06-28T17:02:33Z")

</div>

The deployment.conf file located in&nbsp;/var/lib/dynatrace/oneagent/agent/config holds some agent config information such as the hostgroup. Is it expected behavior for this file to be removed after an uninstall? I was hoping for a way of being able to uninstall the agent (maybe temporarily for whatever reason) then install it back and have the agent pick up its configuration values such as hostgroup, whether it is set to auto injection enabled, etc.

Preserving these values would be good because then we don’t have to worry about what the hostgroup value was and making sure we set it back, along with other agent config values.

---

<div class="post-metadata">

**Author:** ![samuelbernardy](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@samuelbernardy](https://community.dynatrace.com/u/samuelbernardy)\
**Post date:** [July 31, 2023, 1:47pm UTC](https://community.dynatrace.com/t/deployment-conf-file-for-linux-hosts-preserving-after-uninstall/40435/2 "2023-07-31T13:47:24Z")

</div>

Following uninstallation, the config should remain intact at&nbsp; **/var/lib/dynatrace/oneagent/agent/config**. However the deployment.conf file is removed.

To preserve the deployment config specifically, you can save a copy of deployment.conf. Keep in mind that permissions for the file are restricted, so we’d recommend copying the _contents_&nbsp; of the file to a safe location:&nbsp;[https://www.dynatrace.com/support/help/shortlink/release-notes-oneagent-sprint-235#linuxaix-deployment-conf](https://www.dynatrace.com/support/help/shortlink/release-notes-oneagent-sprint-235#linuxaix-deployment-conf)

---

<div class="post-metadata">

**Author:** ![sivart\_89](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@sivart\_89](https://community.dynatrace.com/u/sivart_89)\
**Post date:** [August 3, 2023, 9:05pm UTC](https://community.dynatrace.com/t/deployment-conf-file-for-linux-hosts-preserving-after-uninstall/40435/3 "2023-08-03T21:05:46Z")

</div>

Thank you Sam for the response!

I had hoping the agent could pick up its config after an uninstall (provided the deployment.conf file remained intact) so that we don’t have to reset items, more importantly worry about not setting the right values. Seems that removing the file is “by design” which is unfortunate for us.
