Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Cursor creates cache directories in ~/.config/Cursor/CachedData for each version, but never automatically removes old cache directories from previous versions. This causes the .config directory to grow indefinitely, making backups difficult and wasting disk space.
Steps to Reproduce
- Install and use Cursor for several months
- Update Cursor multiple times (each version creates a new cache directory)
- Check
~/.config/Cursor/CachedDatadirectory size:du -sh ~/.config/Cursor/CachedData - List cache directories and their ages:
cd ~/.config/Cursor/CachedData find . -maxdepth 1 -type d -name "[0-9a-f]*" -exec sh -c 'dir="$1"; age=$(find "$dir" -type f -name "*_0" -printf "%T@\n" 2>/dev/null | sort -n | tail -1); if [ -n "$age" ]; then days=$(( ($(date +%s) - ${age%.*}) / 86400 )); size=$(du -sh "$dir" 2>/dev/null | cut -f1); echo "$days days old: $dir ($size)"; fi' _ {} \;
Expected Behavior
- Automatic cleanup: Cursor should automatically remove cache directories older than a reasonable threshold (e.g., 30 days) when it starts up or periodically
- Keep recent caches: Only cache directories from recent versions (e.g., last 2-3 versions) should be retained
- Respect XDG spec: Ideally, cache should be moved to
~/.cache/Cursor/CachedDataper XDG Base Directory specification (see related issue #89964)
Operating System
Linux
Current Cursor Version (Menu → About Cursor → Copy)
Version: 1.6.45
VSCode Version: 1.99.3
Commit: 3ccce8f55d8cca49f6d28b491a844c699b8719a0
Date: 2025-09-22T18:22:38.013Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Linux x64 6.14.0-33-generic
Additional Information
Workaround:
I’ve created a manual cleanup script, but this should be handled automatically by Cursor:
# Manual cleanup of cache directories >30 days old
find ~/.config/Cursor/CachedData -maxdepth 1 -type d -name "[0-9a-f]*" -exec sh -c 'dir="$1"; age=$(find "$dir" -type f -name "*_0" -printf "%T@\n" 2>/dev/null | sort -n | tail -1); if [ -n "$age" ]; then days=$(( ($(date +%s) - ${age%.*}) / 86400 )); if [ $days -gt 30 ]; then rm -rf "$dir"; fi; fi' _ {} \;
Related Issues:
- Config folder used for caching (XDG spec violation) - Cache should be in
~/.cachenot~/.config
Suggested Solution:
- Implement automatic cleanup of cache directories older than 30 days on Cursor startup
- Keep only the last 2-3 versions’ cache directories
- Move cache to
~/.cache/Cursor/CachedDataper XDG spec (addresses both issues)
Does this stop you from using Cursor
No - Cursor works, but with this issue