Search code examples
pythonraspberry-piraspbiandelete-file

Totaly delete file from Raspbian system


I want to delete Files from my Raspberry Pi without moving it to the Trash can using Python. I tried os.remove(file), but it's moved into the Trash. Can I delete the file without moving it into the Trash or can I empty the Trash?


Solution

  • os.system('rm ' + path) is working.