# (developer feature) not deleting remote tmp files by setting an environment variable

**URL:** <https://forum.ansible.com/t/developer-feature-not-deleting-remote-tmp-files-by-setting-an-environment-variable/11805>\
**Category:** Ansible Project\
**Created:** [August 17, 2012, 1:50am UTC](https://forum.ansible.com/t/developer-feature-not-deleting-remote-tmp-files-by-setting-an-environment-variable/11805 "2012-08-17T01:50:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [August 17, 2012, 1:50am UTC](https://forum.ansible.com/t/developer-feature-not-deleting-remote-tmp-files-by-setting-an-environment-variable/11805/1 "2012-08-17T01:50:32Z")

</div>

If you set ANSIBLE\_KEEP\_REMOTE\_FILES=1 (environment variable only) in the latest git, the files will be left around. This may help with debugging module failures, as you can use this with -vvv to see what commands are run, and then rerun them as needed, and can even retry with different arguments as well.

This should be a helpful debugging tool when troubleshooting those rare but slightly annoying module failures, without having to resort to ./hacking/test-module  
--Michael
