You can use wildcards with the rm command, like rm *.txt to delete all files with the .txt extension.