bug #2464: do tm delete retry in the host

Also does not fail when the file/path does not exist

(cherry picked from commit b17751a2d68616adf8a97a7a5e2688c8de06aebd)