Deleting files and directories from Hadoop HDFS using the 'rm' command in the file system shell to free up storage space or remove unnecessary data.