Article written by Epic Games staff
Unreal Engine projects generate a lot of data that can be pruned from unused branches or platforms. Temporary files can be found under…
- <Engine/Project/Plugin>/Binaries/Platform - often contains checked in files too
- /Build- often contains checked in files too
- /Intermediate - Can be deleted but will need ProjectFiles to be regenerated
- /Saved - Can be deleted
- Engine/DerivedDataCache - Can be deleted if you have reasonably fast access to a shared DDC
There is a UAT script that can clear all or some of these folders from your current branch or an arbitrary folder. This uses P4 to identify files that shouldn’t be deleted, and will leave the generated project files.
This shows all options
RunUAT DeleteProjectOutput -help
This will clear all folders listed above from all projects, skipping any files that exist in Perforce. (Remove the -preview argument to do the actual deletion).
RunUAT DeleteProjectOutput -project=all -deleteall -preview
This will clear all the intermediate binaries and saved files from the engine and all projects but leave the DDC folder
RunUAT DeleteProjectOutput -engine -project=all -binaries -intermediate -saved
This will delete all engine/project temporary files from the d:\p4 path. Because it’s not under a workspace the -nop4 argument tells it to assume P4 status from the read-only flag (this can be used in other cases and is much faster)
RunUAT DeleteProjectOutput -binaries -intermediate -saved -path=d:\p4 -nop4