If you wish to remove a file or folder from your Linux system you can use SSH rm command. In this article, we will show the basic usage of the SSH rm command.
Delete a file using SSH rm command
rm myFile.txt
Delete a file without asking for permission with SSH
rm -f myFile.txt
Delete a file using WildCard
This will delete all .txt files
rm -f *.txt
Delete all files and the directory with SSH rm
rm -rf /path/to/directory
Delete file and display information
rm -v myFile.txt
Delete file while being prompted for it
rm -i myFile.txt