delete rm command line code example Example 1: shell remove file rm <file_name> Example 2: remove directory linux rm -rf /path/to/directory/*