How to Stop Ubuntu Linux from Automatically Generating Thumbnails

The Performance and Privacy Cost of Thumbnails

When you open a folder containing images, videos, or PDFs, the default Ubuntu file manager (Nautilus) automatically scans the contents of those files to generate tiny preview thumbnails. While visually helpful, this automatic generation comes with massive downsides. If you open a folder with thousands of high-resolution RAW photos or large video files, Nautilus will freeze and your CPU usage will spike to 100% as it struggles to render previews. Furthermore, these thumbnails are permanently cached in your hidden `~/.cache/thumbnails` folder, meaning a preview of a private image remains on your hard drive long after you have moved or deleted the original file.

How to Disable Thumbnail Generation in Nautilus

You can adjust the file manager preferences to stop scanning file contents, forcing Nautilus to display fast, generic file icons instead.

1. Open the Files app (Nautilus).

2. Click the three horizontal lines (hamburger menu) in the top-right corner of the window.

3. Select Preferences.

4. In the Preferences window, click on the Search & Preview tab at the top.

5. Look for the “Thumbnails” section.

6. Next to “Show thumbnails,” click the dropdown menu.

7. Change the setting from “All Files” to Never.

How to Clear the Existing Thumbnail Cache

Disabling the feature prevents Ubuntu from creating new thumbnails, but it does not delete the gigabytes of cached previews already hidden on your hard drive. To reclaim this storage space and remove potentially sensitive preview images:

1. Open your terminal.

2. Run the following command to safely delete the entire thumbnail cache: rm -rf ~/.cache/thumbnails/*

Once cleared, the cache will remain empty because Nautilus is no longer allowed to generate new image previews.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.