In master agent, the file will not get deleted because same file may be required for serving other slave agents reporting to this specific master agent.
The salve agent file will get deleted post the job completed. This is applicable for patch installation also.