How do I delete photos from Apple Photos retaining only those marked as favorite?

Solution 1:

You can do this using smart albums.
Unfortunately the gif I made to show this is to big so pictures will have to do.

  1. go to all your photos and select all of them (cmd+a).
  2. Create a new smart album for your selection
    enter image description here
  3. In the popup select photo is not favorite as filter, you should see the number of matches.
    enter image description here
  4. In the smart album are all your photos not marked as favorite, select them all (cmd+a) and delete them (cmd+backspace). enter image description here
  5. Go to all your photos, only the favorites remain. enter image description here
  6. Empty the trash in the photos app to remove all deleted non favorites.