How to clear FiveM cache on PC and server
On a player’s PC, close FiveM and delete the server-cache and server-cache-priv folders in %localappdata%\FiveM\FiveM, and 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. The steps are the same on ESX, QBCore and Qbox, because the cache belongs to FiveM, not to the framework.
Clear the server first. A player who clears their cache while the server still has old files downloads the old files again.
When a cache clear helps
- You replaced a script’s or an asset’s files and restarted the server, and 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 where some files changed and others did not. Once every file is in place, one of its fixes is to clear both the server cache and the client cache..Framework - A crash on launch or the
Game data outdatedmessage is not a cache problem. Cfx.re’s fixes for those are in “If it still fails”.
Before you start
- Every changed file is on the server. Replace the files the update changed and add the ones it added. An escrowed script also needs its
.fxapfile and its hidden files, or the server printsFailed to verify protected resource(what that error means). Replacing a script’s files step by step: installing FiveM scripts. - Keybinds are safe. FiveM keeps keybinds in
fivem, and data that scripts save with its key-value storage in the.cfg kvsfolder. Both are in%appdata%\CitizenFX, which these steps never open. - This is not an FXServer update. Updating the server build is its own job: update FiveM server artifacts.
Which folders to delete
Every folder here sits in %localappdata%\FiveM\FiveM, the default install. On a PC where FiveM was installed elsewhere, open the FiveM folder of that install.
| 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; 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 does not fix old scripts |
game-storage |
GTA V game data FiveM downloaded, by far the largest folder here | Never; FiveM downloads 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 also have cache\game or server-cache\game; leave those two alone.
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 holds the path of the folder that contains
resources. A txAdmin recipe install puts it inside thetxDatafolder, in a folder whose name ends in.base. On a plain install it is the folder you start FXServer from,server-datain Cfx.re’s setup guide. - 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 writes the cache again 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
Server owners can post these steps in 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. Do not 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-storageas well and start FiveM. This deletes 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 puts this on a stuck process or an antivirus holding a file. Restart the PC. If it repeats, open Resource Monitor (resmon), search the handles on the CPU tab forserver-cache-priv, and end the process holding it unless it is named likeFiveM_.b[GameBuild]_ GTAProcess .exe Game data outdated: FiveM needs to update the local game data.: delete nothing. Cfx.re’s fix is to select “Yes”, let FiveM update its game data and restart it. If the message returns, theIVPATH=line inCitizenFX, in.ini %localappdata%\FiveM\FiveM, 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 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 keeps these images itself, on the server and in each player’s game, so a FiveM cache clear leaves the server’s copy in place. An admin runs
/in game, orhousing_clearthumbnails housing_in the server console. The images clear for the server and every connected player and render again.clearthumbnails Configin.Commands .clearThumbnails config/configsets the command name..lua