ubuntu delete all files with extension

Shell
cd <dir>
find . -type f -iname \*.jpg -delete

Source

Also in Shell: