The rm command is used in Linux to delete files and directories. It can be used to delete a few files by specifying each file name, or it can be used with the -r argument (recursive) to delete a directory and the entire directory tree structure which lies beneath it.