# Remove .ansible\_async directory after a play has finished

**URL:** <https://forum.ansible.com/t/remove-ansible-async-directory-after-a-play-has-finished/19898>\
**Category:** Ansible Developer\
**Created:** [November 30, 2015, 2:22pm UTC](https://forum.ansible.com/t/remove-ansible-async-directory-after-a-play-has-finished/19898 "2015-11-30T14:22:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phill\_Tomlinson](https://avatars.discourse-cdn.com/v4/letter/p/a6a055/32.png) [@Phill\_Tomlinson](https://forum.ansible.com/u/Phill_Tomlinson)\
**Post date:** [November 30, 2015, 2:22pm UTC](https://forum.ansible.com/t/remove-ansible-async-directory-after-a-play-has-finished/19898/1 "2015-11-30T14:22:43Z")

</div>

I currently have a number of async tasks that create a number of temporary files under ~/.ansible\_async on each remote host. I would like to delete these whenever a play ends. I know there is the async\_status module “clean” mode:  
[http://docs.ansible.com/ansible/async\_status\_module.html](http://docs.ansible.com/ansible/async_status_module.html)

However I have a lot of async jobs and would need to keep track of all their jid’s and go onto each host before the play terminates. Is there a setting to just delete the whole contents of this directory when the ansible process ends?

Regards,  
Phill
