How to disable Quick Look cache in macOS

Quick Look in macOS is handy for previewing files, but for that reason you might want to clear the cache from time to time.

We’ve already covered how to use Quick Look in macOS. With this technology, you can quickly preview the contents of files without having to open them by selecting them and pressing the spacebar.

Each time you do this, Apple generates a small image to represent the current items displayed in the Quick Look window. These images are cached and can grow to significant sizes over time.

In some cases, if the files are stored on an unencrypted volume, they may also reveal sensitive data, which you don’t want. For these two reasons, you may want to clear the Quick Look cache data from your Mac from time to time.

Saved Files

Starting with macOS Ventura, Quick Look stores several cached files in /private/var/folders/ in a folder with a random name, usually two characters, then another folder with a long random name, and a folder inside that named “C”. . For example /private/var/folders/x8/067t9c811b38449zf9swlz980000gn/C.

Inside the “C” folder is another folder called “” and within that is the cache folder itself called “”.

The agent then generates and caches the Quick Look image for display in the Quick Look window. For photos, these files may also contain paths to the original file in the file system, which you may not want others to have access to.

If the selected documents are text, the cached thumbnail may also contain small images of the actual text of those documents, which then go into the cached folder.

If a document or image contains sensitive personal information and you view it quickly, these cache files can create copies of that information that get cached. Once that happens, other apps or people with access to the Mac can go in and read the cached data.

These files include thumbnails, data, multiple SQLite databases, and other files.

Apple ships a binary UNIX tool called qlmanage with macOS, which is located at /usr/bin/qlmanage on your startup volume’s file system. The /usr folder and subfolders are normally hidden, so you must first unhide files in Terminal or Finder to see the folder.

For more information about the qlmanage tool, type in the terminal man qlmanage and press To return

There are several flags you can pass to qlmanage to tell it what to do. Some of these commands are:

Clear the cache

To clear your Quick Look cache on macOS, type in the terminal qlmanage -r cache and press To return.

Note that after clearing the cash, there may be a slight delay in the next quick search in one or more large files. This is because the selected app may need to regenerate the previews and thumbnails, and if these images are large, this may take a while.

Disabling the Quick Look cache

There is no direct command to stop the XPC service running in the background to generate Quick Look previews. Killing the with Activity Monitor won’t stop it as long as the OS just automatically restarts it.

If you want to completely disable the Quick Look cache, you’ll need to set aside the Quick Look generators themselves, located in System/Library/QuickLook/. In particular, Text.qlgenerator and Image.qlgenerator.

To disable the feature entirely, you need to put them all aside so the thumbnails are never generated at first and then go into the macOS file system where they can be easily spotted.

Also note that third-party Quick Look generators may also be installed in the user’s home folder under /Users/~/Library/QuickLook/.

We don’t recommend doing this as it’s generally not a good idea to mess around with parts of the operating system and can corrupt the operating system or make your Mac unbootable. But if you want to turn off QuickLook, the option is there.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button