# What traces does Ansible leave on remote hosts and how can I remove them?

**URL:** <https://forum.ansible.com/t/what-traces-does-ansible-leave-on-remote-hosts-and-how-can-i-remove-them/24884>\
**Category:** Ansible Project\
**Created:** [July 3, 2017, 5:44pm UTC](https://forum.ansible.com/t/what-traces-does-ansible-leave-on-remote-hosts-and-how-can-i-remove-them/24884 "2017-07-03T17:44:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nick\_Kakouros](https://avatars.discourse-cdn.com/v4/letter/n/d26b3c/32.png) [@Nick\_Kakouros](https://forum.ansible.com/u/Nick_Kakouros)\
**Post date:** [July 3, 2017, 5:44pm UTC](https://forum.ansible.com/t/what-traces-does-ansible-leave-on-remote-hosts-and-how-can-i-remove-them/24884/1 "2017-07-03T17:44:29Z")

</div>

I noticed that Ansible keeps a ~/.ansible directory. How can I delete it? Are there other traces of Ansible on the VM being configured?

---

<div class="post-metadata">

**Author:** ![Daniel\_JD](https://avatars.discourse-cdn.com/v4/letter/d/f19dbf/32.png) [@Daniel\_JD](https://forum.ansible.com/u/Daniel_JD)\
**Post date:** [July 8, 2017, 12:19pm UTC](https://forum.ansible.com/t/what-traces-does-ansible-leave-on-remote-hosts-and-how-can-i-remove-them/24884/2 "2017-07-08T12:19:18Z")

</div>

Ansible should cleanup the files inside that folder. It should be empty! I dont know a way to completly remove it…  
You could change the path to /tmp/.ansible and then it should automatically be cleaned by the OS (because /tmp is a tmpfs which is located in DRAM or if its a normal filesystem, by a systemd.timer).

Another thing you probably want to change, set no\_logs to True:

no\_logs: True

which prevents ansible to write the logs in syslog.

---

<div class="post-metadata">

**Author:** ![Daniel\_JD](https://avatars.discourse-cdn.com/v4/letter/d/f19dbf/32.png) [@Daniel\_JD](https://forum.ansible.com/u/Daniel_JD)\
**Post date:** [July 8, 2017, 12:20pm UTC](https://forum.ansible.com/t/what-traces-does-ansible-leave-on-remote-hosts-and-how-can-i-remove-them/24884/3 "2017-07-08T12:20:13Z")

</div>

```auto
I forgot to tell you how to change that path :D

The option is the following:

remote_tmp = ~/.ansible/tmp

```

---

<div class="post-metadata">

**Author:** ![Nick\_Kakouros](https://avatars.discourse-cdn.com/v4/letter/n/d26b3c/32.png) [@Nick\_Kakouros](https://forum.ansible.com/u/Nick_Kakouros)\
**Post date:** [July 23, 2017, 3:26pm UTC](https://forum.ansible.com/t/what-traces-does-ansible-leave-on-remote-hosts-and-how-can-i-remove-them/24884/4 "2017-07-23T15:26:09Z")

</div>

Thanks for the info, I will try setting the path to /tmp/ansible.

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [July 24, 2017, 1:53pm UTC](https://forum.ansible.com/t/what-traces-does-ansible-leave-on-remote-hosts-and-how-can-i-remove-them/24884/5 "2017-07-24T13:53:25Z")

</div>

The no\_log setting might be too much as it obscures the info on the  
controller also, there is another setting that specifically prevents  
writing to syslog on the remote:

no\_target\_syslog = False
