[HOW TO] Change local data cache location

If you work with the Unreal Engine 4 you probably know what Derived Data Cache is. There is a nice article about it: Derived Data Cache | Unreal Engine Documentation which also explains you how to change the location you use to share your DDC with other people. But what if you want to change the location of the DDC itself? Your local cache. By default, the local cache uses your Engine/DerivedDataCache folder. What if you want to move it to another location? For example, to a separate HDD. You can! There’s another environment variable you can set: UE-LocalDataCachePath, just set it to any path you want!

Note #1: I haven’t tested it on a binary build of the engine (the one you download from the Launcher) but I assume that it will not work. For more details, open Engine/Config/BaseEngine.ini, find a section called [InstalledDerivedDataBackendGraph] and compare it to the section called [DerivedDataBackendGraph].
Note #2: This will change data cache location for ALL your compiled copies of the engine, which may result in conflict if you have multiple copies on your machine!


Thanks was looking into this myself. Can you explain which baseEngine.ini that needs updating as I have several.

My issue is that I have unreal engine on my B: ssd drive and yet it insists on putting it in this location


If you have downloaded the engine from the Launcher, then you have to edit [UE4_ROOT]\Engine\Config\BaseEngine.ini

Find the [InstalledDerivedDataBackendGraph] section, then find this line in it:

Local=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, PurgeTransient=true, DeleteUnused=true, UnusedFileAge=34, FoldersToClean=-1, Path=“%ENGINEVERSIONAGNOSTICUSERDIR%DerivedDataCache”)

As you can see, the “Path” parameters tells the engine where to save DDC. By default it’s in AppData folder. So just replace it with any path you want (the path can be relative or absolute)

Note, that I haven’t tested this method myself!

If you compiled the engine from GitHub source then just create an environment variable UE-LocalDataCachePath and set the path as it’s value. Keep in mind, that in this case it will change the DDC directory for all compiled versions of the engine you have. This should work - I tested it.


If I compiled the engine from GitHub source, then how can I recreate the Compressed.ddp for engine’s local Derived Data Cache?

I’ve tried some, but everytime I import some thing, engine still tries to compile shader, and my generated Compressed.ddp only have 80M.

1 Like


I am not sure about Compessed.ddp but you can use this command:

UE4Editor-Cmd [GameName] -run=DerivedDataCache -fill -DDC=CreatePak

to create a redistributable package from your DDC.

1 Like

Thank you Robert, that worked :slight_smile:

NOPE Don’t work

I have to argue there with you Drixil, you must of made a mistake.
Worked a treat for me, this is what mine now looks like, saving me a nice 10GB on my OS dedicated SSD.

Root=(Type=KeyLength, Length=120, Inner=AsyncPut)
AsyncPut=(Type=AsyncPut, Inner=Hierarchy)
Hierarchy=(Type=Hierarchical, Inner=Boot, Inner=Pak, Inner=CompressedPak, Inner=EnginePak, Inner=Local)
Boot=(Type=Boot, Filename="%ENGINEUSERDIR%DerivedDataCache/Boot.ddc", MaxCacheSize=512)
Local=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, PurgeTransient=true, DeleteUnused=true, UnusedFileAge=34, FoldersToClean=-1, Path="X:\UE4DataCache")

I can confirm this works as expected on the 4.11 Launcher version of the engine.

You can also copy the EXISTING Data Cache folder and put it in your new location and everything loads as quickly as it did before!


Thanks for the help/Tutorial!!

It might be the name of your new folder. Don’t use “DerivedDataCache” again if you put it in %GAMEDIR%, where already has a DerivedDataCache folder.

I set the dir to “%GAMEDIR%DerivedDataCache” with no effects plus the engine rewrite it to default.
Then I changed it to: “%GAMEDIR%LocalDerivedDataCache”, it worked like a charm.

Thanks for the help dude!

Can you please make a youtube video tutorial of this please? for some reason it does not work and i need to clear space quickly, my sdd just fills up to much.
What i wanna do is move everything ue4 related (cache & vault, not the projects) to an other HDD drive, let’s say the path would be : E:\UE4DataCache.
Im using UE 4.15 & 4.18.2 downloaded trough Epic Games Launcher if that helps solve my problem.
And let me know if there is a video on how to do this please.

Anyone please?

Another way to move your DDC files to another location if you don’t want to mess with the config location is to simply create a junction or shortcut to another drive/location. Just move the whole folder “C:\Users<your user name>\AppData\Local\UnrealEngine” to a new location for me I put it on my second SSD drive root so I now have “F:\UnrealEngine” then just create a shortcut to the new location in “C:\Users<your user name>\AppData\Local”

This moves not just the common DDC but potentially any other engine version specific files over to that same location, if you want to remove old engine version or common DDC files you can just go into F:\UnrealEngine and remove them there.

You can use the same trick for moving your VaultCache for the Launcher to a new location as well.

Also you can use a Junction instead of a shortcut, but most people are not comfortable with command line operations and batch files, so typically prefer Shortcuts and I think they basically the same thing, but for those interested you can use a batch file command like this to achieve the same result

mklink /j C:\Users\deanb\AppData\Local\UnrealEngine F:\UnrealEngine

Hope that helps.


Thank you for this, things were getting hairy :slight_smile:

Why it’s not in editor preferences or launcher settings?

1 Like

can EPIC not simply give us a more simpler solution to this deriveddatacache location in the engine itself ?

I have edited my BaseEngine.ini as described, and it seemed to work for a bit, but I’m downloading via Bridge and my C drive just exploded to 0MB left.

This seems like such a simple thing. We need to tell UE where our “scratch disc” is. and have all of this stuff put there automatically.


Where would this batch file go ?

It can go anywhere because it uses absolute paths.

Not working for me. With the shortcut way

This worked perfectly for me. Moved my UnrealEngine folder, created a shortcut, deleted original folder and replaced it with new shortcut. All projects open fine, 42 GBS saved on my C drive, thanks.

1 Like