Clear FiveM cache: what to delete and keep
To clear the FiveM cache on a player’s PC, close FiveM and delete the server-cache and server-cache-priv folders in %localappdata%\FiveM\FiveM. Keep game-storage, which holds the GTA V data FiveM downloaded. On the server, stop it and delete the cache folder in the server data folder. It’s the same on ESX, Qbox and QBCore, because the cache belongs to FiveM, not to the framework.
Do the server first. If a player clears their cache while the server still has the old files, they download the old files all over again.
When a cache clear helps
- You replaced a script’s or an asset’s files and restarted the server, but players still see the old screen, texture or model.
- After a script update, the console prints
Syntax error near '<\1>'orattempt to call a nil value (field 'x'). Our common problems page traces these to a wrongConfig, missing files, or an update that replaced some files but not others. Once every file is in place, one of the fixes it lists is clearing both the server cache and the client cache..Framework - A crash on launch or the
Game data outdatedmessage isn’t a cache problem. Cfx.re’s fixes for both are under “If it still fails”.
Before you start
- Every changed file is on the server. Replace the files the update changed and add any new ones. An escrowed script also needs its
.fxapfile and its hidden files, or the server printsFailed to verify protected resource(what that error means). For replacing a script’s files step by step, see installing FiveM scripts. - Keybinds are safe. FiveM keeps keybinds in
fivem, and the data scripts save in its key-value storage goes in the.cfg kvsfolder. Both live in%appdata%\CitizenFX, which these steps never open. - This isn’t an FXServer update. Updating the server build is a separate job: update FiveM server artifacts.
Which folders to delete
All of these folders are in %localappdata%\FiveM\FiveM, the default install. If FiveM is installed somewhere else on that PC, open that install’s FiveM folder.
| Folder | What it holds | Delete it? |
|---|---|---|
server-cache-priv |
Script and asset files downloaded from the servers the player joined | Yes |
server-cache |
FiveM’s resource cache, which can be empty | Yes |
nui-storage |
The in-game browser’s data, where script screens can store their own data | Only if a script screen still shows the old version |
cache |
Server list data and copies of FiveM’s own programs, no server files | No, it doesn’t fix old scripts |
game-storage |
GTA V game data FiveM downloaded, by far the largest folder here | Never. FiveM would download it all again |
Leave every folder outside data alone. citizen and bin are FiveM itself, and plugins and mods hold add-on files. FiveM’s client source stores game data in data\game-storage and moves an old cache\game folder there. Older installs may still have cache\game or server-cache\game. Leave those two alone as well.
Clear the server cache
- Stop the server, from the txAdmin dashboard or, on a plain install, by closing FXServer.
- Find the server data folder. In txAdmin, open Settings, then the FXServer tab. The “Server Data Folder” field shows the path of the folder that contains
resources. A txAdmin recipe install puts it insidetxData, in a folder whose name ends in.base. On a plain install it’s the folder you start FXServer from, which Cfx.re’s setup guide callsserver-data. - In that folder, rename
cachetocache-old. Leaveresources,server,.cfg dband every other folder as they are. Thecache\filesfolder holds packed copies of each started resource, such ascache\files\tk_.policejob\resource .rpf - Start the server. FXServer rebuilds the cache as each resource starts.
- Once the server runs without errors, delete
cache-old. If the server fails to start, stop it, delete the rebuiltcacheand renamecache-oldback tocache.
Clear the cache on a player’s PC
You can post these steps in your Discord after an update.
- Close FiveM. In Task Manager, end
FiveMand every process whose name starts with.exe FiveM_. - Press the Windows key and R, enter
%localappdata%\FiveM\FiveMand select OK. The folder from the table opens..app\data - Delete
server-cacheandserver-cache-priv. Don’t deletegame-storage. - Start FiveM and join the server. The first join takes longer while FiveM downloads the server’s files again.
- If a script screen still shows the old version, close FiveM again, delete
nui-storagetoo and start FiveM. That wipes everything FiveM’s in-game browser stored, including what script screens saved.
Check it works
- Server:
cache\filesholds a folder for each started resource again, and the console shows no error for the updated script. - Player PC:
server-cache-privfills again during the first join, and the updated screen, texture or model shows in game.
If it still fails
- Windows says a folder is in use: FiveM is still running. End
FiveMand the.exe FiveM_processes in Task Manager, then delete the folders again. Opening database (privcache:/) failed: IO error: Could not lock file: Cfx.re’s article blames this on a stuck process or an antivirus holding a file. Restart the PC first. If it happens again, open Resource Monitor (resmon) and search the handles on the CPU tab forserver-cache-priv. End the process holding it, unless it’s named likeFiveM_.b[GameBuild]_ GTAProcess .exe Game data outdated: FiveM needs to update the local game data.: don’t delete anything. Cfx.re’s fix is to select “Yes”, let FiveM update its game data and restart it. If the message comes back, check theIVPATH=line inCitizenFX, in.ini %localappdata%\FiveM\FiveM. It must point to the GTA V folder..app GTA5_crash: Cfx.re’s article says verifying the GTA V game files fixes most cases, not a cache clear.bXXXX .exe!_ runReaderThreadTick - The old version shows even after both clears: an old file is still on the server. Compare the resource folder with the download and copy every changed file again. Our docs suggest WinSCP instead of FileZilla for the upload.
- Furniture thumbnails or interior photos in our Housing System V3 & Shell Creator look old after a cache clear. The script stores these images itself, on the server and in each player’s game, so a FiveM cache clear leaves the server’s copy alone. To clear them, an admin runs
/in game, orhousing_clearthumbnails housing_in the server console. The images clear for the server and every connected player, then render again.clearthumbnails Configin.Commands .clearThumbnails config/configsets the command name..lua