GitHub - zachisfine/fivem-cache-clear: A simple tool for clearing up FiveM cache and related data · GitHub
Skip to content

About

A simple tool for clearing up FiveM cache and related data

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

FiveM Cache Cleaner

Clears FiveM caches, archives logs and crash dumps, purges GPU shader caches, flushes DNS, and relaunches Steam, Discord, and FiveM — all in one click.

Quick Start

  1. Download one of these files to your Desktop:

    • fivem_clean.bat — double-click to run (works everywhere)
    • fivem_clean.ps1 — right-click > Run with PowerShell
  2. The script automatically:

    • Updates itself to the latest version from GitHub on each run
    • Finds your FiveM install (even on D:, E:, or other drives)
    • Closes FiveM, Steam, and Discord
    • Clears all FiveM caches and GPU shader caches
    • Archives your logs to Documents\FiveM-Logs\
    • Flushes your DNS cache
    • Relaunches Steam, Discord, and FiveM in the right order

No configuration needed for standard installs.

Options

Batch version (fivem_clean.bat)

Run from Command Prompt or create a shortcut with flags:

fivem_clean.bat /norelaunch       Don't relaunch apps after cleanup
fivem_clean.bat /skip-steam       Don't relaunch Steam
fivem_clean.bat /skip-discord     Don't relaunch Discord
fivem_clean.bat /retention:7      Keep logs for 7 days instead of 14
fivem_clean.bat /winsock          Reset Winsock (requires admin, needs reboot)

PowerShell version (fivem_clean.ps1)

.\fivem_clean.ps1 -NoRelaunch     # Don't relaunch apps after cleanup
.\fivem_clean.ps1 -SkipSteam      # Don't relaunch Steam
.\fivem_clean.ps1 -SkipDiscord    # Don't relaunch Discord
.\fivem_clean.ps1 -Retention 7    # Keep logs for 7 days instead of 14
.\fivem_clean.ps1 -Winsock        # Reset Winsock (requires admin, needs reboot)

What Gets Cleaned

Item Details
FiveM caches All *cache* folders/files inside FiveM.app\data\
GPU shader caches NVIDIA (GL/DX), AMD, Intel, and D3D shader caches
DNS cache Windows DNS resolver cache
Old logs/crash dumps .log, .mdmp, .txt files older than the retention period

Logs are archived to Documents\FiveM-Logs\ as a timestamped .zip before anything is deleted.

How FiveM Is Found

The scripts search for FiveM in this order:

  1. Default location: %LOCALAPPDATA%\FiveM\
  2. (PowerShell only) Windows Registry: fivem:// protocol handler
  3. Root of every drive letter: D:\FiveM\, E:\FiveM\, etc.

If your FiveM is in a subfolder like D:\Games\FiveM\, edit the script and set the path manually near the top.

Troubleshooting

"FiveM not found" warning Your FiveM is in a non-standard location the script can't auto-detect. Open the script in Notepad and set the FiveM path near the top of the file.

PowerShell says "execution of scripts is disabled" Right-click the .ps1 file > Properties > check Unblock and click OK. Or run it directly:

powershell -ExecutionPolicy Bypass -File fivem_clean.ps1

Steam or Discord don't relaunch The script auto-detects Steam on other drives too. If it still can't find it, edit the Steam/Discord paths near the top of the script.

Auto-update says "Could not check for updates" Your internet may be down or GitHub is unreachable. The script will continue with the current version. No action needed.

Winsock reset fails Right-click the script and select Run as administrator.

About

A simple tool for clearing up FiveM cache and related data

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages