Use exiftool to accomplish this task
Navigate to the directory of all the wrong images that needed rotation
cd needRotate90CW
# Remove all metadata from the images
exiftool -all= *.jpg# Rotate them 90 degrees counter clockwise and overwrite
exiftool -orientation="Rotate 90 CW" -overwrite_original *.jpg
The above seemed to work but did not change the metadata to the width and height. It only rotated.
SOLUTION!
I found the easiest method is to use Nautilus file manager and
Nautilus Image Converter