sudo rm -r *-1.jpg

I would like to delete all files that end with -1.jpg in media library as they are duplicates.

I use sudo rm -r *-1.jpg at the wp-content/uploads folder. They are deleted successfully. However, images still show up in media library. Are there other areas I need to delete them?