Se mentre stai cancellando un file, ti appare questo errore: device or resource busy , con un comando puoi vedere quale servizio sta utilizzando quel file:
lsof +D /path