Currently all my iPhone photos are stored on iCloud and I also have a photo library on my Mac. Is there a way I can merge the 2 libraries into iCloud and automatically remove any duplicates? Or would I have to go through and do this manually?
On the Mac, enable iCloud Photos then the photos already on the Mac should sync to the cloud and photos in iCloud will sync to the Mac. If you have the same photos in both places you'll get duplicates but you can then search for and remove duplicates on the Mac using the Duplicates sidebar.