Find all files (indicated by ~) that do not have a name ending in .jpg (indicated by ! -name '*.jpg') and execute the command rm -f (remove the file) on each of them (indicated by -exec rm -f {} \;).
find ~ ! -name '*.jpg' -exec rm -f {} \;