Reducing the size of UE5 source build

I use a UE source build, solely because it’s required to make PS4/PS5 games. I don’t make frequent changes to the source build – maybe a few times per year at most. The UnrealEngine folder is 370GB currently, leaving me with <30GB on my PC, so I’m looking for ways to reduce the size.

Some ideas I’ve seen:

  • Delete .git folder: We don’t switch back to previous UE versions once we upgrade, so this seems viable.
  • Create an Installed Build: This seems like the best option if it’s applicable to my circumstances (building to PS4/PS5, and having some custom plugins in UnrealEngine\Engine\Plugins). If so, I’d appreciate specific instructions/the exact command to run. [sources: 1, 2]

I’d appreciate feedback on these ideas, and/or any additional recommendations to free up space in my circumstances.

The exact command is very simple.

./Setup.bat (in WIndows)

./GenerateProjectFiles.bat

The most important:

./Engine/Build/BatchFiles/RunUAT.bat BuildGraph -target=“Make Installed Build Windows” -script=Engine/Build/InstalledEngineBuild.xml -clean -set:HostPlatformOnly=true -set:BuiltDirectory=“D:\\FoldernameWhereYouWantTheFiles”

Before the last command ,edit the file Engine/Build/InstalledEngineFilters.xml and add this two lines:

I use dSYM because I’m in Mac ,but if you are in Windows use ‘pdb’

That will save you 50 gigas of space or more.

If you want Fab and Bridge include in the build delete those two lines you see there.

If you want an Extra platform like android or IOS , include in the las command “-set:WithAndroid=true” or “-set:WithIOS=true”

If you dont want to build DDC file (Shaders Cache) use “-set:WithDDC=false” , build the DDC take a lot of time if you have multiples platform.