In reply to Renato.

The shell command runs using the account that you're connected with, so make sure that account can execute the rm command in the working directory. And...make sure the working directory is where you think it is. And...make sure the file you're trying to remove isn't in use. (For example, if you try to rm a data set that's loaded, or an XLSX file that has a libname assigned to it.)