UE4 built from source takes 170GB disk space

Hello. Yesterday I built unreal engine 4.26.1 from the source. Out of curiosity, I went and check the size of the build + source combined, and my jaw just dropped. I have 500GB SSD, I don’t want to dedicate all my SSD to unreal engine. Is there any way to optimizations that I can do to reduce the size of this?

I also have 500GB SSD, and tried to reduce the size as much as possible. Mine is 90GB for UE 4.25.

I run setup.bat with this command line in order to exclude anything different then Win64 target

setup.bat --exclude=Mac --exclude=osx64 --exclude=osx32 --exclude=iOS --exclude=IOS --exclude=ios --exclude=Linux --exclude=linux --exclude=Linux32 --exclude=linux32 --exclude=Linux64 --exclude=linux64 --exclude=linux_x64 --exclude=Android --exclude=android --exclude=HoloLens --exclude=TVOS --exclude=Win32 --exclude=WinRT --exclude=winrt --exclude=HTML5 --exclude=html5 --exclude=XboxOne --exclude=Switch --exclude=Dingo --exclude=PS4 --exclude=Win32 --exclude=win32

In the UE4*.Target.cs I have these disabled, since I don’t need them:

bCompileAPEX = false;
bCompileSpeedTree = false;
bCompileNvCloth = false;

Recently , I enabled also the Windows compression, since the binaries/obj files compress quite well, and the slow down shouldn’t be much. This leads to 65GB

Gaming rigs that ship with 500 GB should be made illegal…
A decade ago you’d even get 1TB-2TB with HDD, so WTF?

Besides ensuring that you do not have any files related to platforms you will not be targeting, not really.

Using compression will potentially slow down operations related to compiling and debugging.

The easier way to avoid the size issue is not to use a source built version of the engine, if you can help it.

So, the question is, can you help it? :slight_smile:

FYI, I have an entire 1TB SSD dedicated to our project.
Of that, roughly 700GB is used, though a number of that is due to having to build a binary for other people.

Even ‘Binary’ builds of Unreal Engine are extremely hard to run within 500 GB tbh.
Each engine version is ~30GB, not including DDC which can add 10-30 GB more.

Then there’s the average size of UE projects which can easily run into a few gigs!
Plus, usually you need multiple engine versions installed because UE is unstable.
And then you have to subtract whatever remaining space Windows bloat takes up.

So, how much is left? As you still need extra space for packaging / staged builds.

Especially if you’re working on Multiple Projects, and have ‘Asset Packs’ installed.
The Launcher itself means even more bloat as it keeps duplicate copies of assets.
So, there’s really nothing left for anything else. Cheap external drives help though! :wink:

Thanks for the valuable explanations. Now I get that the problem is not me. It is just the way things are when you work with UE. I guess I am going to go for more storage space then.

Last year i purchased special USB TYPE-C M.2 box to compile UE5, already tested on UE4 and i am ready for UE5. developer100 thanks for setup.bat commands.