I made one final editing pass in Lightroom over my photos from last year’s trip to Costa Rica and Panama, making sure they were the ones I wanted to keep and that they all had titles. Then I went to Apple Photos and deleted all the photos from the trip there.
After that, I exported the edited photos from Lightroom to my disk as TIFFs, then used the Mac’s sips
command to convert them to HEICs to put back into Apple Photos:
for file in *.tif
do sips "$file" -s format heic --out "${file%%.tif}".heic
done
Using TIFFs as the intermediate format instead of JPEGs is probably overkill, but with a fast processor, it doesn’t matter and makes me feel better.