I have found that on both Linux and Windows servers folder NolioAgent/tmp gets cleaned up on every service/server restart. This happens not just for retrieval agents, but all agents in general.
Does RA have any configuration to clean up this folder?
Yes, this folders are cleaned automatically after each successful run, there is no other out of box configuration .
If a deployment has failed and I need to manually cleanup all the artifacts and other temp files created, what are the files that needs to be cleared? what variables I can use to achieve this to create a post deployment processes?
Please check Url: Release Automation KB: Artifact Distribution and Cleanup
This will help you. If you have further queries kindly create a new thread.
Let us know if you need any further information on this thread.