When using an SFTP server, the correct command would be "rm file.txt". To remove a file from a SFTP server using RCurl I build on @Ruggero Valentinotti his answer, using:
curlPerform(url = "sftp://xxx.xxx.xxx.xxx/", quote = "rm file.txt", userpwd = "user:pass")