Deleting based on file matches

The find command's -delete flag removes files that are matched instead of displaying them. Remove the .swp files from the current directory:

$ find . -type f -name "*.swp" -delete