The average iPhone owner takes and stores a lot of photos - partly because iPhones these days have excellent cameras and decent amounts of storage. But enormous photographic libraries have downsides, one of which is how awkward it can be to go through and delete the ones you don't want.
In this simple tutorial we explain how to select all your photos by using iCloud: from there you can delete them, move them to an album or fine-tune your selection for further sorting.
Select all photos in iCloud
Go to iCloud.com on your Mac or PC, log in and click Photos.
The default view puts you in Moments, where photos are subdivided into days (or parts of days). If you hover the cursor over a moment you'll see the word Select appear on the right, and by clicking this you'll select all the photos in that moment.
To select all the photos in all the moments, press Cmd + A. But note that you need to have clicked somewhere on the web page first. When you first arrive on the page, pressing Cmd + A doesn't do anything.
On PC, press Ctrl + A. (Oddly enough, on PC we found we didn't need to click on the page first, but your mileage may vary.)
The same technique works in the other view (Photos, rather than Moments), or in albums selected from the bar on the left. In these cases you shouldn't need to click anywhere else before hitting Cmd + A, because you interacted with the page when you switched to that view or album.
Deselect some (or all) photos
A neat trick, if you've got a massive backlog of photos and only want to keep a few, is to select all and then deselect a small number.
To deselect an individual photo, hold Cmd and left-click it. (To re-select it, Cmd-click it again.)
You can deselect a moment (from the Moments view) by hovering the cursor over it and then clicking Deselect when it appears.
Are your photos on iCloud?
Note that iPhone photos are not necessarily uploaded to iCloud - you can stipulate in Settings that they remain on your device, in which case they won't be accessible from anywhere else. You may prefer things this way (you might be worried about iCloud being hacked) but it prevents the following technique from working.
If you do want your iPhone photos to be accessible via iCloud, open the Settings app, tap your face/name at the top, then tap iCloud > Photos and turn on iCloud Photos. (This is all covered in our article How to download photos from iCloud to Mac.)