how to delete a file from the command line bash code example Example 1: bash remove directory rm -rf directory-name Example 2: shell remove file rm <file_name>