If KDE Plasma feels sluggish, shows stale thumbnails, or behaves as though it has not noticed an application change, clearing its cache may help. In most cases, KDE cache files are temporary and will be recreated automatically. The safest approach is to close the applications involved, remove only cache data—not settings or personal files—and then sign out and back in if needed. This guide explains where KDE cache is stored, how to clear it from the terminal or file manager, and what to avoid.
Where KDE Stores Cache Files
KDE applications generally use the cache directory defined by the XDG Base Directory specification. Unless you have changed your environment, that directory is ~/.cache inside your home folder. The tilde (~) means your personal home directory. KDE Plasma, KDE Frameworks, and individual applications may create separate folders there for temporary data such as thumbnails, downloaded content, indexes, and generated metadata.
Your cache location may be different if the XDG_CACHE_HOME environment variable has been set. To check the location KDE applications are configured to use, open Konsole and run:
echo "${XDG_CACHE_HOME:-$HOME/.cache}"
This prints the configured cache directory, or the usual ~/.cache location when the variable is not set. To see which items are using space, run:
du -sh "${XDG_CACHE_HOME:-$HOME/.cache}"/* 2>/dev/null
Cache contents vary by KDE version, distribution, and installed applications. You might see folders related to Plasma, KDE services, thumbnails, or specific programs. Not every folder with a KDE-related name needs to be removed, and a cache folder may not exist until its application has created it.
Before You Clear the KDE Cache
Save your work and close the KDE applications whose cache you plan to remove. If an application is running while its cache is deleted, it may recreate files immediately, behave unexpectedly until restarted, or keep using data already loaded into memory. For the most thorough cleanup of Plasma-specific files, sign out of your desktop session first, then clear the cache from a terminal in another session or from a text console.
Deleting cache files is different from resetting KDE. Cache files are temporary, but configuration and personal data are not. In particular, do not delete these directories as a way to clear cache:
-
~/.config, which contains application and desktop settings. -
~/.local/share, which may contain application data, themes, icons, and other user files. -
~/.localas a whole, which can include important KDE and application data.
Removing configuration or application data can reset your desktop, remove customizations, or cause data loss. You normally do not need administrator privileges to clear your own cache, so do not use sudo with commands that remove files from your home directory.
Clear the Entire KDE User Cache
If you want to clear all cached data for your user, first make sure the cache path printed by the command is the one you expect. Then remove the contents of that directory—not the directory itself—with:
cache_dir="${XDG_CACHE_HOME:-$HOME/.cache}"
printf 'Cache directory: %s\n' "$cache_dir"
find "$cache_dir" -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +
The find command targets items directly inside the cache directory, including hidden items. Read the displayed path before running the removal command, especially if you have manually set XDG_CACHE_HOME. This deletes the cache for KDE and other applications that use that same user cache directory; it is not limited to Plasma. Applications will rebuild required files, so the first launch after cleanup may be slower.
If you would rather remove only a particular application’s cache, inspect the folders first and delete just the relevant one. For example, if a folder named some-app is clearly the cache for an application you have closed, you can remove it with:
rm -rf -- "${XDG_CACHE_HOME:-$HOME/.cache}/some-app"
Replace some-app with the exact folder name you have checked. Avoid copying a command with a guessed folder name or broad wildcard into a terminal without understanding what it will remove.
Clear KDE Cache Using Dolphin
You can also remove cache files without using terminal commands. Open Dolphin, press Ctrl+L to enter a location, and type ~/.cache. If the folder is not visible in your home directory, that is normal: names beginning with a dot are hidden. In Dolphin, press Ctrl+H to show hidden files.
Close the application whose cache you want to clear, locate its cache folder, and move that folder to the Wastebin. Review the selection carefully before confirming. To clear the whole user cache, select the contents of ~/.cache rather than deleting unrelated folders from your home directory. Emptying the Wastebin is optional; until then, the removed files may still occupy disk space.
When you use a custom XDG_CACHE_HOME location, navigate to the path reported by the terminal command rather than assuming the cache is in ~/.cache.
Clear Common KDE Cache Types
Sometimes you only need to refresh one type of temporary data. Clearing a specific cache is less disruptive than removing everything, although the application may need to rebuild it.
-
Thumbnail cache: Image and video previews are commonly stored under
~/.cache/thumbnails. Close file managers and image applications, then remove the contents of that folder if previews are missing or out of date. Dolphin will generate thumbnails again as you browse files. -
Plasma cache: Plasma-related cache items may appear under
~/.cachewith names containing “plasma.” Their exact names can differ between Plasma releases. Close the desktop session before removing a Plasma cache folder, and do not confuse cache folders with Plasma settings under~/.config. - KIO or downloaded-content cache: KDE’s KIO components and individual applications may keep temporary data for network locations or downloaded content. Check the relevant folder before removing it. Clearing this data can mean that content has to be downloaded or fetched again.
-
Font cache: If fonts appear incorrectly after installing or removing fonts, closing and reopening applications may be enough. For a user font-cache refresh, run
fc-cache -f. This rebuilds font information; it is not a command for clearing every KDE cache.
Refresh KDE Service Information
If KDE does not recognize a newly installed application, service, or file association, the problem may be stale service information rather than ordinary cache files. KDE provides the kbuildsycoca tool to rebuild its service cache. Depending on your KDE release, the command is commonly kbuildsycoca6 for KDE Frameworks 6 or kbuildsycoca5 for KDE Frameworks 5.
Check which version is available on your system, then run the matching command without sudo:
kbuildsycoca6 --noincremental
If that command is not found, try the version used by your distribution:
kbuildsycoca5 --noincremental
You do not need to run both commands. Some distributions may package the tool differently or provide a version-specific name. Rebuilding the service cache is more targeted than deleting the entire ~/.cache directory, so try it when the issue involves application discovery or KDE service menus.
What to Expect After Clearing the Cache
KDE and its applications recreate cache files as needed. The first login or application launch after cleanup may take longer while Plasma rebuilds data and file managers regenerate previews. A temporarily empty thumbnail view, a brief pause, or increased disk activity can be normal. Give the desktop time to finish starting before deciding that the cleanup caused a problem.
If an issue returns immediately, the cache may not have been its cause. Check whether the affected application is still running, whether you removed the cache for the correct user, and whether the problem is actually related to configuration or application data. For a persistent issue, consult the application’s documentation before removing additional folders.
Flatpak and Browser Cache Considerations
Applications installed as Flatpaks can store data in Flatpak-specific locations, as well as using standard cache paths. Their data and settings should not be deleted casually: removing an application’s Flatpak data can reset it or erase information. If you suspect a Flatpak-specific cache problem, use the application’s own cache controls or check its documentation before removing files.
Web browsers also manage their own caches, often through a privacy or settings menu. Clearing the KDE user cache does not necessarily clear a browser’s internal cache, and clearing a browser cache is usually the better choice if only web pages or site images are outdated. Be careful not to select saved passwords, cookies, or site data unless you intend to remove them; those items can affect logins and browsing sessions.
Conclusion
To clear KDE cache, start by checking the cache location with echo "${XDG_CACHE_HOME:-$HOME/.cache}". Close relevant applications, then remove either the specific stale cache folder or the contents of your user cache directory. Avoid deleting ~/.config or ~/.local/share, and do not use sudo for your personal cache. For KDE application-discovery problems, rebuild the service cache with the appropriate kbuildsycoca command instead. KDE will recreate needed cache files, though the first launch after cleanup may take a little longer.
Disclaimer: Articles are written by Humans, AI or Both. Verify Important information.