0 Replies Latest reply on Sep 29, 2010 7:25 AM by Ian Lyons

    How do I to mass-delete develop preset from selection of images?

    Ian Lyons MVP & Adobe Community Professional

      Yes, but it requires direct editing of you Lightroom catalog. The following SQL query was provided by Dorin Nicolaescu-Musteață

       

       

      This makes it tempting to backup catalog, go into SQL to select/fix the bad entries.

       

      Here you go:

       

       

      UPDATE adobe_imagedevelopsettings
         SET text =
                (SELECT hs1.text
                   FROM adobe_libraryimagedevelophistorystep hs1
                  WHERE hs1.image = adobe_imagedevelopsettings.image
                    AND hs1.id_local =
                           (SELECT MAX (hs2.id_local)
                              FROM adobe_libraryimagedevelophistorystep hs2
                             WHERE hs2.image = adobe_imagedevelopsettings.image
                               AND hs2.id_global <>
                                        adobe_imagedevelopsettings.historysettingsid)),
             historysettingsid =
                (SELECT hs1.id_global
                   FROM adobe_libraryimagedevelophistorystep hs1
                  WHERE hs1.image = adobe_imagedevelopsettings.image
                    AND hs1.id_local =
                           (SELECT MAX (hs2.id_local)
                              FROM adobe_libraryimagedevelophistorystep hs2
                             WHERE hs2.image = adobe_imagedevelopsettings.image
                               AND hs2.id_global <>
                                        adobe_imagedevelopsettings.historysettingsid)),
             digest = NULL
       WHERE image IN (SELECT ci.image
                         FROM aglibrarycollectionimage ci, aglibrarycollection c
                        WHERE c.id_local = ci.collection AND NAME LIKE 'ScrewAutoSync')
         AND (SELECT COUNT (*)
                FROM adobe_libraryimagedevelophistorystep
               WHERE image = adobe_imagedevelopsettings.image) > 1
      

       

       

      This rather ugly SQL query will take all pictures from a collection called "ScrewAutoSync" and move their develop history one step back.

       

      So, here's what one has to do:

      1. Backup catalog.
      2. Create a collection called "ScrewAutoSync" and add all affected images into it.
      3. Close Lightroom, open your catalog in an SQLite utility and run the above query.

       

      Good luck!