How to Clear the FiveM Server Cache (and When To)
How to clear the FiveM server cache, where the cache folder is on Windows, Linux and txAdmin, what clearing it does, and when a player cache is the real cause.

- Applies to
- FXServer and FiveM client source of November 17, 2026 (commit 8cbec36, still the latest on December 3, 2026); txAdmin source of October 23, 2026; FiveM Legacy, with the FiveM for GTAV Enhanced differences the Cfx sources state; Qbox, ESX, QBCore and servers without a framework alike
- Last verified
On this page
- Direct Answer
- What the FiveM server cache is
- What clearing the FiveM server cache does
- When to clear the FiveM server cache
- How to clear the FiveM server cache on Windows or a Linux VPS
- Why players still see the old car, map or clothing
- How players clear the FiveM client cache
- Other files called “cache” in FiveM
- Troubleshooting
- Next Steps
Direct Answer
To clear the FiveM server cache, stop the server, delete the cache folder inside your server data folder (the folder that holds resources and server.cfg), then start the server again. FXServer creates the folder again and rebuilds it. You rarely need to: every time a resource starts, FXServer compares its files with the cache and rebuilds whatever changed, and players download any file whose SHA-1 hash changed. If players still get an old car, map or clothing file, restart that resource and look for a second file with the same name before you delete anything.
What the FiveM server cache is
The server cache is a folder FXServer writes for itself. When the server starts, it creates a cache folder and a files folder inside it, in the directory it was started from. It then prepares, for every resource, what players will download:
Path inside cache/files/<resource>/ | What it holds |
|---|---|
resource.rpf | A packed copy of the resource’s fxmanifest.lua, its file, client_script, shared_script and map entries |
resource.rpf.db | The name, modification time, size and file ID of each of those files when the pack was built |
resource.sfl | The list of files in the resource’s stream folder, each with its SHA-1 hash |
resource.sfl.db | The same name, time, size and ID record for the stream folder |
stream_cache/ | One hard link per streamed file, named z plus its hash |
The stream_cache folder also contains a text file whose name explains itself: “these files are hardlinks - they do not take up any disk space by themselves.txt”. Your models and textures are not copied there; the links point at the files in resources.
FXServer attaches these cache components to every resource it loads. Nothing in the cache depends on a framework, so the folder works the same on Qbox, ESX, QBCore, vMenu and FiveM Basic Server, and on roleplay, racing, PvP or zombie servers alike.
FiveM server cache location
FXServer creates cache in its current working directory. The official vanilla setup tells you to “Run the server from the server-data folder”, and txAdmin starts FXServer with the Server Data Folder as its working directory. txAdmin’s setup page describes that folder as “The folder that contains the resources and cache folders, usually it’s here that you put your server.cfg.”
| How the server runs | Where the cache folder is |
|---|---|
| Vanilla on Windows (docs example) | C:\FXServer\server-data\cache |
| Vanilla on Linux (docs example) | ~/FXServer/server-data/cache |
| txAdmin, server deployed from a recipe | In the deploy folder, which txAdmin suggests as <txData>/<name>_<id>.base |
| Any txAdmin server | The path in Settings, tab FXServer, field Server Data Folder, plus cache |
txAdmin’s txData folder sits next to the artifact folder on Windows and in the folder that holds run.sh on Linux. On game hosts using Pterodactyl, txAdmin’s own documentation says the txData path “is usually set to /home/container”, so a recipe-deployed server’s cache sits in a .base folder below it.
FiveM for GTAV Enhanced uses the same vanilla steps; only the server archive and executable have other names (cfx-server_win_x64, cfx-server-linux_x64, cfx-server.exe). The source code quoted in this guide is the public FXServer source. An Enhanced bug report quotes the error “Failed to generate cache for set: resource.rpf”, so the Enhanced server builds the same resource.rpf cache set.
What clearing the FiveM server cache does
Each time a resource starts, FXServer decides for each cached set whether it is still valid. It rebuilds the set when:
- the set file is missing, or its
.dbrecord cannot be loaded; - the list of file names differs from the record;
- the modification time, size or file ID of any file differs from the record.
Otherwise it keeps the cached set. For stream, a rebuild reads every streamed file again, computes its SHA-1 hash, makes a fresh hard link and removes the links of files that are no longer in the folder. The hash of each resource.rpf is recalculated at every start in any case.
So deleting the cache changes nothing in resources or in your configuration. On the next start every resource finds its set missing, and FXServer rebuilds all of them, reading and hashing every streamed file once more.
The reverse matters more: FXServer only runs this check when a resource starts. After you replace a car, map or clothing file, restart that resource (ensure or restart followed by its name) or restart the server. The Cfx docs describe ensure as restarting a started resource or starting it if it was not running. For a new resource folder, refresh first “Rescans the resources folder and loads all resource manifests in them”.
Why txAdmin has no automatic cache cleaner
txAdmin’s feature graveyard lists an Automatic cache cleaner and explains why it is gone: the feature “were created due to the vast number of requests, but in the end this ‘common knowledge’ was based on misinformation, therefore it was removed since we don’t actually need it”. In the 2019 forum thread it links to, txAdmin’s developer tabarra decided against automatic deletion as “not necessary and actually quite dangerous if not configured correctly”.
When to clear the FiveM server cache
Clearing does not touch your resources, and it helps in few situations:
- Disk space after removing resources. The only clean-up in FXServer’s cache code deletes hard links inside a running resource’s
stream_cache. Thecache/filesfolders of resources you have deleted fromresourcesare not part of it. The hard links take no space of their own, but eachresource.rpfis a real packed copy of the resource’s client files. - A start from a clean state. If you want to rule the cache out while you work through the causes below, clearing it costs one full rebuild at the next start.
Texture loss has its own causes, which the console points to; the texture loss guide covers them.
How to clear the FiveM server cache on Windows or a Linux VPS
The steps are the same on Windows and Linux, on a home PC or a VPS. Only the way you delete the folder changes.
-
Stop the server. In txAdmin, use the stop button in the server controls (its tooltip reads “Stop the server”). Without txAdmin, type
quitin the server console; the docs say it “Exits the server, sending a default quit message to all connected players”. Do not delete the folder while the server runs: its file server readsresource.rpffromcache/files, and a missing file is answered with “Stat of file … failed” instead of the download. -
Open the server data folder. It is the folder that holds
resourcesandserver.cfg. With txAdmin, copy the path from Settings > FXServer > Server Data Folder. -
Delete only the
cachefolder. On Windows, delete it in File Explorer. On a Linux VPS, remove it withrm -r, which the GNU coreutils manual page describes as “remove directories and their contents recursively”. Give the full path, so the command cannot run in the wrong folder:rm -r ~/FXServer/server-data/cacheThat path uses the folder from the vanilla docs; put your own server data folder in front of
/cache. On a game host, use its file manager. Leaveresources,server.cfgand txAdmin’stxDataalone. -
Start the server. In txAdmin the same button now reads “Start the server!”. FXServer creates
cacheandcache/filesagain, and each resource rebuilds its set as it starts. -
Read the console once. A yellow line
Could not make hard link for ...means FXServer could not create the links instream_cache. It prints this only once per run, and then serves the original file fromresources, so players still get their downloads.
Why players still see the old car, map or clothing
Work through these in order. They are sorted by what you see.
Everyone still gets the old version after you replaced the files
The resource was not restarted. FXServer builds its file list and hashes when the resource starts, and serves that list until the next start. Run ensure with the resource name, or restart the server, then rejoin. Clearing the cache adds nothing that a restart does not already do. The addon car guide and the MLO installation guide cover the manifest and stream layout for FiveCrate’s kind of content: addon vehicles and MLO interiors.
The new model loads, but one texture or part is from an older pack
Two resources stream a file with the same name. When the FiveM client registers a streamed file whose name is already registered, it points that name at the file registered last and logs overriding handle for with the file name. Which copy wins therefore depends on load order, not on which file you changed most recently. Inside one resource the same thing happens earlier: FXServer lists streamed files by their bare file name, and when two files in different subfolders share a name, only one of them is kept in the list. Search your resources folder for the file name and keep one copy. For clothing packs, the custom clothing troubleshooting guide goes through the other reasons a garment does not show.
Players behind your caching proxy get old files
If you serve downloads through a caching proxy with fileserver_add, the proxy has a cache of its own. Cfx’s 2019 cookbook article, now marked “Cookbook Archive”, says there was “no cache invalidation logic based on hashes” and to “clear your proxy’s cache before you modify/restart a resource”. The current client source adds ?hash= and the file’s hash to every download address. The current proxy example in the docs uses proxy_cache_key $request_uri$is_args$args, and nginx defines $request_uri as the “full original request URI (with arguments)”, so a changed file gets a new cache key there. If your proxy’s cache key leaves out the query string, the 2019 advice still applies. The DDoS protection and proxy guide covers the proxy setup.
One player sees the old file and everyone else sees the new one
This is the player’s own cache, and FiveM normally repairs it by itself. The server sends each file’s SHA-1 hash. The client looks the file up in its local cache by that hash, checks the hash of its local copy, and on a mismatch logs “hash … does not match … - redownloading” and downloads the file again. A failed download is retried; after five attempts the client gives up with the last error, such as “Failure downloading” and the file name. If the player still sees the old file, use the steps below.
How players clear the FiveM client cache
Cfx’s own pages do not give a cache-clearing procedure for players. In an April 2023 bug thread, nta, who linked the commit with the fix in the same thread, wrote that “most server joins should not be downloading new content at all”. If a player wants to clear it anyway, these are the folders.
FiveM installs into %localappdata%\FiveM, or into the folder the installer was run from if that folder was empty. Cfx’s support pages open the client folder as %localappdata%/FiveM/FiveM.app. The data folder inside it holds these folders, as named in the FiveM launcher source, which moved them out of an older cache folder in 2021:
Folder in FiveM.app\data | What it is |
|---|---|
server-cache | The client’s cache of resource files from servers |
server-cache-priv | The folder Cfx support names for the privcache:/ lock error; the public source does not say what it holds |
game-storage | Game files, not server files; FiveM mounts files from it when an older game build is requested |
nui-storage | The in-game browser’s storage, moved there from cache/browser |
cache | What was left of the client’s old cache folder after that 2021 move |
- Close FiveM completely. A process that still holds these files gets in the way. Cfx’s article on the error
Opening database (privcache:/) failed: IO error: Could not lock fileshows how to find a process holding them: openresmon, go to the CPU tab and search the associated handles forserver-cache-priv. - Open the data folder. Press Win+R, enter
%localappdata%\FiveM\FiveM.app\dataand press Enter. - Delete only
server-cache. It holds the downloaded server files and their index database, and FiveM creates both again at the next start. Leavegame-storage(game files),server-cache-privand the other folders alone, and never delete the wholeFiveM.appordatafolder. - Start FiveM and join the server. The first join downloads the server’s files again, so it takes longer.
Values that server scripts save on the player’s PC with resource key-value storage (KVP) are not in these folders. The client keeps them under fxd:/kvs/, and fxd:/ is %AppData%\CitizenFX, the folder that also holds fivem.cfg.
FiveM for GTAV Enhanced has its own installer. The Cfx pages read for this guide do not give its install folder, so check the paths above against your own install before you delete anything.
Other files called “cache” in FiveM
caches.xml. The Client Issues page says to “Delete caches.xml from your FiveM application data folder” for “Error loading component xyz.dll”. The file belongs to the FiveM launcher’s updater, not to any server. The launcher source of November 17, 2026 readscontent_index.xmlfirst, treatscaches.xmlas the old name, and deletescaches.xmlwhen it writescontent_index.xml, so a current install may only have the newer file.- Map cache files.
save_gta_cachesaves a file such asyour_resource_name_cache_y.datfor a map resource, to “speed up initial loading for players”. It ships inside the resource and is listed underfilesinfxmanifest.lua. Deleting the servercachefolder does not touch it.
Troubleshooting
“Could not make hard link for …” after clearing the cache
FXServer failed to create a link in stream_cache. The line is printed in yellow and only once per run. FXServer then serves each such file from its path in resources, so downloads keep working.
Players fail to download after the cache was deleted on a running server
The file server answers a missing file with HTTP 500 and “Stat of file … failed. Error code from libuv”. Restart the server so every resource rebuilds its set.
“Failed to generate cache for set: resource.rpf” on FiveM for GTAV Enhanced
Bug report 477 of September 1, 2026 showed this error for resources that contain both stream and stream_enhanced, on early access build b139. A maintainer closed it “as this issue was fixed in the September 24 patch”. Update the server as shown in the FXServer update guide; deleting the cache is not the fix named there.
“Opening database (privcache:/) failed: IO error: Could not lock file”
This is a player-side error. Cfx support says software “having a lock on a file” causes it, such as “a stuck process or antivirus”, or a file in “a directory that requires administrative permissions”. Their steps: restart the PC, check the antivirus file lock, then find and end the process holding server-cache-priv in Resource Monitor.
“hash … does not match … - redownloading” in a player’s log
The player’s cached copy did not match the hash the server sent, so the client fetched it again. A single line is the cache working as designed. If the download keeps failing, the error after it names the file and the reason.
Players hang on the loading screen after an update
After an update or a cleared player cache, the next join downloads the missing files first, so it takes longer. If players stay at one stage, the stuck on loading screen guide maps each stage to its server-side cause.
Next Steps
- Set up the rest of your server with the FiveM server setup guide.
- Install the next car pack cleanly with the addon car guide.
- Check a new map’s files and its optional cache file with the MLO installation guide.
- Keep FXServer current with the FXServer update guide.
Browse Addon vehicles
Addon vehicles with custom handling, audio and visual modifications for FiveM servers.
Official documentation and repository references
- FXServer source: ResourceStreamComponent.cpp (streamed file cache)
- FXServer source: ResourceFileDatabase.cpp (change check)
- FiveM client source: ResourceCacheDeviceV2.cpp (download and hash check)
- Cfx.re Docs: Setting Up a Vanilla FXServer
- Cfx.re Docs: Server Commands
- txAdmin docs: Feature Graveyard
- Cfx.re Support: Opening database (privcache:/) failed
- Cfx.re Docs: Optimizing Resource Downloads Using a Caching Proxy (2019 archive)
Related guides
FiveM Texture Loss: Causes and Fixes for Server Owners
Fix FiveM texture loss at the source: find the oversized assets that fill players' streaming memory, check OneSync, and set Extended Texture Budget right.
How to Install an MLO on a FiveM Server
How to install an MLO on a FiveM server: stream folder, fxmanifest.lua with this_is_a_map and DLC_ITYP_REQUEST, map conflicts, MLO not showing, Enhanced.
How to Add Addon Cars to a FiveM Server
How to add cars to a FiveM server: stream folder, vehicles.meta and data_file lines in fxmanifest.lua, ensure, a spawn test, pack merging and Enhanced.
How to Make a FiveM Server in 2026 (txAdmin + Portal)
How to make a FiveM server in 2026: download FXServer, finish txAdmin setup, deploy a recipe, add a Cfx Portal key, set listing details and open port 30120.
How to Update FiveM Server Artifacts and Fix EOL Errors
Update FiveM server artifacts on Windows or Linux without losing txData: pick Recommended or Latest, then fix end-of-life, outdated and native errors.




