Why And How To Clear Your Lightroom Cache
December 3, 2013
17 comment

Like many applications, Lightroom uses cache to make things run faster. Occasionally, something goes wrong with the management of the cache and it becomes necessary to clear or purge it. This post will explain the different types of cache, why you might want to purge it, and how to do it.

Types of Cache in Lightroom

There are four primary types of cache that Lightroom uses: camera raw, video, preview, and Smart Preview.

Camera Raw

When you view or edit raw images in the Develop module, Lightroom will generate previews using the original image data and then updating the preview for any processing or adjustments that have been applied. The process is a little faster if the original image data is in the Camera Raw cache, so Lightroom checks there first to see if it can skip some of the raw processing.

Video Cache

Similar to the Camera Raw cache, Lightroom maintains a video cache to help with the performance of viewing and manipulating video files.

Preview Cache

Lightroom uses previews to display thumbnails in many places, and it keeps cached versions of these previews in its preview cache.

Smart Preview Cache

New to Lightroom 5 are Smart Previews that allow for offline editing of images. Unlike the Preview cache that gets used for all images, Smart Previews are only created when you tell Lightroom to create them so not every image is represented.

Why You Might Want To Clear Your Cache

There are a few reasons why you might want to clear your cache.

A corrupted cache can cause weird behavior in Lightroom. You might be missing all your previews, or you might start getting error messages during operations that require or generate previews, such as when importing new images.

You might get an error message from Lightroom that tells you that it is unable to read from the preview cache and needs to close; this is a clear indicator that a purge might be in order.

Finally, the cache file could be bloated with a bunch of stuff you no longer care about and taking up extra space on your hard drive. In that case, starting fresh and forcing Lightroom to rebuild it with only the images in your catalog can save you disk space.

How To Clear Your Cache

The first two types of cache, the Camera Raw and Video cache, can be purged from inside your Lightroom Preferences.

Lightroom Fanatic - Lightroom Preferences - File Handling

Lightroom Fanatic – Lightroom Preferences – File Handling

Go to Preferences > File Handling to find the purge buttons for both the Camera Raw and Video cache.

The Preview and Smart Preview caches are a little different. By default, Lightroom stores the cache data for the Previews in a file next to your catalog in a filed named [Catalog name] Previews.lrdata and the data for the Smart Previews in [Catalog name] Smart Previews.lrdata. Purging those caches involves deleting the corresponding .lrdata file.

If you delete either of those .lrdata files, Lightroom will regenerate them and repopulate the previews as they are needed. Keep in mind that if you have a huge catalog and delete all of your previews, Lightroom needs to regenerate them so it could take time.

If you delete your preview cache, the next time you open Lightroom, it will generate a new preview .lrdata file. You should see it start to fill in previews, and you should also see the size of the .lrdata file continue to grow as Lightroom continues to generate more previews.

The Smart Preview cache file is not automatically generated when you open Lightroom like the normal preview cache is. Instead, it will be generated when you create a new smart preview.

Tip: For safety’s sake, close Lightroom before you delete either of the preview files.

 

, , , , ,

How To Automatically Launch Lightroom By Inserting A Media Card

FacebookTwitterGoogle+PinterestLinkedIn Like many ...

Read more

Multiple Computer Lightroom Workflow Using Catalog Export

FacebookTwitterGoogle+PinterestLinkedIn Like many ...

Read more

How To Find Your TIFF (or PSD) Files In Your Lightroom Catalog

FacebookTwitterGoogle+PinterestLinkedIn Like many ...

Read more

There are 17 comments

  • Lonny says:

    I can’t use preferences because lr will not stay open..needing to close due to preview read errors.

    • dave says:

      Hi, Lonny. If removing the cache doesn’t work, try renaming your catalog and then opening up Lightroom. It should ask if you want to create or open a catalog. Create a new one and see if you still have issues. If so, try uninstalling and reinstalling Lightroom. If not, then might be your catalog itself is corrupt, in which case you should try opening up your backups.

      • angela says:

        How do you rename your catalog? I’m having the same issue as Lonny.. As soon as I open LR, a message comes up saying that Lightroom encountered an error when reading from its preview cache and needs to quit. So I can’t do anything because LR closes down after I click OK.

        • dave says:

          Find the catalog file itself using Finder or Windows Explore and rename the file there and then try to open up Lightroom.

  • Sean says:

    Man, tired of this. LR5.3 and a working preview cache of 70GB. I’ve highlighted all projects with 1:1 and told to remove all and the lrpreview file remains at 70GB. Restarted computer, no change. Is this a chronic issue with LR?

    • dave says:

      Hi, Sean. I’m not sure if removing all the previews actually removes them or just marks them so they aren’t used, which are obviously two different things. It’s like deleting things from your computer; they go in to the trash bin, and space is reclaimed when the trash is empty. That could explain why the preview file doesn’t shrink. You could always try the optimize options on the catalog, although I’m not sure how much cleanup that does. The other option is to remove the preview files and start from scratch, then let Lightroom regenerate stuff as it needs it. Hope that helps.

      • Sean says:

        Hmm… It seems that removing 1:1 command has always removed the previews in previous versions. I clearly remember this behavior. It doesn’t make sense to me that it would be “remove _references_ to 1:1 previews” as that would cause a runaway memory leak of sorts… there isn’t a prefs area for “don’t use more than X MB of space for previews”. So, I think this is a bug. Deleting the lrdata file is a pain as I have current previews in there that took hours to generate for an upcoming filter/process job. ADOBE!

        • dave says:

          I did some searching and Lightroom has been doing this behavior forever. This seems like a reasonable explanation: http://forums.adobe.com/thread/358039

          1:1 previews will not be deleted unless your chosen standard-sized preview is less than half the size of the full-sized preview. For example, you have images with pixel dimensions of 3072 by 2048 pixels (6MP camera such as Canon 10D) and have selected 1680 pixels for standard-sized previews. Since a 1680 pixel preview is more than half the size of the original the full-sized preview will be kept, even after using the purge 1:1 preview command. Had you chosen 1440 pixel for standard-sized previews then the full-sized would have been purged (i.e. 3072/2=1536, which is greater than 1440). Now take the example of a larger camera, say a 8MP camera such as the Canon 1DMKII with an image size of 3504 by 2336 pixels. With the standard-sized set at 1680 pixels the full-size will again be purged (i.e. 3504/2=1752 pixels, which is greater than 1680 pixels).

          Another thing worth mentioning – Lightroom will usually delay purging previews for deleted images until after the application has been closed and reopened, even then it might take a few minutes to clear the purged previews. The idea here is to ensure the previews don’t get deleted whilst there’s still a chance that they may be needed (e.g. you removed images by mistake then use Undo command to reinstate them).

          So a combination of preview size ratio and late cleanup on Lightroom’s part. That could also explain why it seems random. Lots of people with lots of different cameras with different resolutions using different preview sizes in Lightroom, so the combination causes seemingly random behavior.

          I changed my standard preview size to 1024 and repeated the delete exercise and my preview file shrunk more than when I had a larger standard preview size selected.

          • Sean says:

            wow, great find! I typically render 1:1 for the Lib module and don’t find much utility for standard previews. But, you’d think with a direct command to remove the 1:1, I’d be telling LR that i’m ok with re-rendering my raws into smaller standard previews if they didn’t exist. Thanks for digging.

          • Sean says:

            I changed the standard preview to smallest and LR immediately freed 30GB when I restarted the app.

          • dave says:

            Awesome! I’m actually doing some experimenting on my side and seeing much of the same thing, so I’m putting together a related post that will launch on Tuesday. Hooray for free space!

  • Melanie says:

    Hi! I’m a ROOKIE lightroom user. Its been awesome but all of a sudden I don’t see my file previews. I’ve purged the raw and video cache as suggested above. The previews doesn’t work for old or new catalogues. The images are there though they export and print fine but I can’t see what happens when I want to work on them. Can you guys assist me on how to fix this?

    • dave says:

      Oh man! Are you previews missing from your develop module, too? Do you see any icons where the image should be? Is it a gray or black background? I know, more questions than answers! Which version of Lightroom are you using?

  • Leon says:

    Thank you for this article. I’m very new to Lightroom. My Lightroom is starting to act up. It did got stuck on my last import and did not build any smart previews. As well, it’s not able to find some of my edited files. I do some editing in Nik. As well, I’m unable to export these files (obvious if Lightroom cant find them) though they are still on my external hard drive. I’m apprehensive to back up my library because I’m afraid the corruption will be saved in my library. I keep my library on an external hard drive and my backup is on my internal hard drive. Where am I going to find the preview cache? And do you think purging the cache will resolve what I’m experiencing? Thank you,

    • dave says:

      Purging the cache shouldn’t hurt. The downside is if you have a large catalog, regenerating previews might take some time.

      As for the other issues, I’m not familiar enough with Nik to know where/how they store their edits. In Lightroom, edits are stored in the catalog (and/or XMP sidecar file), so other applications that look at the raw file wouldn’t see the edits unless they can read XMP. Maybe Nik is doing something similar and storing the edits along side the original image, and Lightroom might not be able to read them.

      Also, make sure you have the latest version of Lightroom installed. And if you still experience the issues, you can also try to create a new catalog and see if that makes things better. If it does, might be a problem with your original catalog.

      Hope that helps!

      • Leon says:

        Thank you very much for your prompt response. I import using DNG and Nik creates a .TIFF file that (I’m pretty sure) is also stored in the catalog. I’m able to open the .TIFF file and view it directly off of the hard drive in “Preview ” on my Mac. I will try your suggestions. Thank you very much. Oh, are the previews and smart previews stored on my external hard drive with the library?