# UE4 built from source takes 170GB disk space

**URL:** <https://forums.unrealengine.com/t/ue4-built-from-source-takes-170gb-disk-space/158081>\
**Category:** C++\
**Tags:** unreal-engine, Engine-Source-Code, GitHub\
**Created:** [February 18, 2021, 11:43am UTC](https://forums.unrealengine.com/t/ue4-built-from-source-takes-170gb-disk-space/158081 "2021-02-18T11:43:10Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bora\_Semiz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bora\_Semiz](https://forums.unrealengine.com/u/Bora_Semiz)\
**Post date:** [February 18, 2021, 11:43am UTC](https://forums.unrealengine.com/t/ue4-built-from-source-takes-170gb-disk-space/158081/1 "2021-02-18T11:43:10Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![developer100](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@developer100](https://forums.unrealengine.com/u/developer100)\
**Post date:** [February 18, 2021, 12:41pm UTC](https://forums.unrealengine.com/t/ue4-built-from-source-takes-170gb-disk-space/158081/2 "2021-02-18T12:41:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kris](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kris/32/758129_2.png) [@Kris](https://forums.unrealengine.com/u/Kris)\
**Post date:** [February 19, 2021, 2:32am UTC](https://forums.unrealengine.com/t/ue4-built-from-source-takes-170gb-disk-space/158081/4 "2021-02-19T02:32:41Z")

</div>

> [@Bora\_Semiz](#):
>
> Is there any way to optimizations that I can do to reduce the size of this?

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? 🙂

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.

---

<div class="post-metadata">

**Author:** ![Bora\_Semiz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bora\_Semiz](https://forums.unrealengine.com/u/Bora_Semiz)\
**Post date:** [February 23, 2021, 8:30pm UTC](https://forums.unrealengine.com/t/ue4-built-from-source-takes-170gb-disk-space/158081/6 "2021-02-23T20:30:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![AE\_3DFX](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ae_3dfx/32/1194637_2.png) [@AE\_3DFX](https://forums.unrealengine.com/u/AE_3DFX)\
**Post date:** [February 23, 2021, 11:00pm UTC](https://forums.unrealengine.com/t/ue4-built-from-source-takes-170gb-disk-space/158081/7 "2021-02-23T23:00:21Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![douglaslassance](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/douglaslassance/32/1210436_2.png) [@douglaslassance](https://forums.unrealengine.com/u/douglaslassance)\
**Post date:** [April 18, 2022, 4:44pm UTC](https://forums.unrealengine.com/t/ue4-built-from-source-takes-170gb-disk-space/158081/8 "2022-04-18T16:44:12Z")

</div>

I also add a couple more excludes `--exclude=Samples --exclude=Templates --exclude=FeaturePacks --exclude=Engine/Documentation --exclude=Engine/Saved`.

---

<div class="post-metadata">

**Author:** ![GodMitry](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GodMitry](https://forums.unrealengine.com/u/GodMitry)\
**Post date:** [August 3, 2022, 7:18am UTC](https://forums.unrealengine.com/t/ue4-built-from-source-takes-170gb-disk-space/158081/9 "2022-08-03T07:18:53Z")

</div>

> [@developer100](#):
>
> –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

I don’t recommend excluding templates unless you are not planning to add C++ classes at all.

---

<div class="post-metadata">

**Author:** ![Ares9323](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ares9323/32/1194521_2.png) [@Ares9323](https://forums.unrealengine.com/u/Ares9323)\
**Post date:** [August 29, 2023, 5:32pm UTC](https://forums.unrealengine.com/t/ue4-built-from-source-takes-170gb-disk-space/158081/10 "2023-08-29T17:32:08Z")

</div>

Sorry for reviving an old post, but it’s been a while since I’ve built the engine from source…  
I remember a 150+ GB size for the folder but 380GB is a bit too much IMHO…

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/5/d/d5db165c93cff59414a9817c50de80a0986b1cf5.png)

Am I doing something wrong or is this normal?

---

<div class="post-metadata">

**Author:** ![JaredTherriault](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jaredtherriault/32/1194499_2.png) [@JaredTherriault](https://forums.unrealengine.com/u/JaredTherriault)\
**Post date:** [August 29, 2023, 5:46pm UTC](https://forums.unrealengine.com/t/ue4-built-from-source-takes-170gb-disk-space/158081/11 "2023-08-29T17:46:06Z")

</div>

Mine’s about 300, I don’t know what’s going on in your .git folder. Everything else looks about right.

You can start trimming the fat by deleting plugins you know you don’t need, like virtual production stuff probably if you’re a game dev.

---

<div class="post-metadata">

**Author:** ![AActor\_424](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/aactor_424/32/630972_2.png) [@AActor\_424](https://forums.unrealengine.com/u/AActor_424)\
**Post date:** [December 13, 2023, 7:28am UTC](https://forums.unrealengine.com/t/ue4-built-from-source-takes-170gb-disk-space/158081/12 "2023-12-13T07:28:59Z")

</div>

I also built UE 5.3.2 from source and my total disk usage of the built engine is ~ 300GB although I excluded any platform target (except Win64) I dont plan to use with the -exclude= option.

Seems we have to deal with it or remove plugins we dont want to use.

I also read you can delete the intermediate folder. But if you change something in the engine source files, you need to recompil it again from scratch.

Here is the link to this info:

> [@After building unreal engine from source, the folder is now 168GB. What can i delete?](https://forums.unrealengine.com/t/after-building-unreal-engine-from-source-the-folder-is-now-168gb-what-can-i-delete/639560/8):
>
> I just delete Vault Cache, but it helps only if there are some imported materials, etc.

And here is another interesting link, similar to the one above:

> [@Building Unreal Engine from Source = huge file size](https://forums.unrealengine.com/t/building-unreal-engine-from-source-huge-file-size/327853/4):
>
> Hi zbuffer14, Something you could try would be to delete the Engine/Intermediate folder after having built the Engine. The next time you open the Editor, it will take a little longer than usual as it rebuilds the parts of this folder that it needs. However, once that is done, you will have a much smaller folder and overall Engine size. Not quite the same size as the Binary Engine, but it will be significantly smaller than it was. Keep in mind that if you do delete the Engine’s Intermediate fol…

---

<div class="post-metadata">

**Author:** ![AActor\_424](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/aactor_424/32/630972_2.png) [@AActor\_424](https://forums.unrealengine.com/u/AActor_424)\
**Post date:** [December 14, 2023, 10:29pm UTC](https://forums.unrealengine.com/t/ue4-built-from-source-takes-170gb-disk-space/158081/13 "2023-12-14T22:29:35Z")

</div>

Update for 5.3.2:

I was able to reduce the build sitze from around 300GB to 160 GB. I think the mistake I made was that I built the entire solution instead of only the containig UE5 project.

Here is the proof:

 ![grafik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/c/7/3c7bbaec62e819edb0943d941d3a7654f0aff254.png)

After I have downloaded all the necessary files through the command line, I opened the project in VS 2022 and only built the project UE5:

 ![grafik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/d/1/7d17ebf5d80feb112789f69bccce28d5f1211400.png)

 ![grafik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/9/b/69b80def86fc901cbcbd364b0807873cf709fd96.png)

It took 1h 42min on my intel i7 8700k and 32GB RAM

---

<div class="post-metadata">

**Author:** ![jwatte](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jwatte/32/744941_2.png) [@jwatte](https://forums.unrealengine.com/u/jwatte)\
**Post date:** [December 14, 2023, 10:37pm UTC](https://forums.unrealengine.com/t/ue4-built-from-source-takes-170gb-disk-space/158081/14 "2023-12-14T22:37:55Z")

</div>

Is your git folder a shallow checkout? You probably don’t want all the old versions and separate branches.

---

<div class="post-metadata">

**Author:** ![AActor\_424](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/aactor_424/32/630972_2.png) [@AActor\_424](https://forums.unrealengine.com/u/AActor_424)\
**Post date:** [December 14, 2023, 11:24pm UTC](https://forums.unrealengine.com/t/ue4-built-from-source-takes-170gb-disk-space/158081/15 "2023-12-14T23:24:47Z")

</div>

I did not checkout the repository, I just downloaded the release via .zip file.

But, I recently tested packaging an emtpy project. I ran into the “windows sdk not found” error.

Maybe I excluded too many platforms to save on disk space.

I am currently re-building and this time not excluding any platforms to see if this method resolves the error.

---

<div class="post-metadata">

**Author:** ![AActor\_424](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/aactor_424/32/630972_2.png) [@AActor\_424](https://forums.unrealengine.com/u/AActor_424)\
**Post date:** [December 15, 2023, 7:43am UTC](https://forums.unrealengine.com/t/ue4-built-from-source-takes-170gb-disk-space/158081/16 "2023-12-15T07:43:02Z")

</div>

I rebuilt 5.3.2 yesterday from scratch and strictly sticked to the official guide from epic games.

So no exclusion of platforms. Just executed Setup.bat normally.

Now my foldersize is 180gb, which is kinda acceptable. No windows sdk errors anymore and packaging seesm okay at first glance.

EDIT: yes, I can package the starter map without any issues.

---

<div class="post-metadata">

**Author:** ![Ares9323](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ares9323/32/1194521_2.png) [@Ares9323](https://forums.unrealengine.com/u/Ares9323)\
**Post date:** [December 15, 2023, 1:49pm UTC](https://forums.unrealengine.com/t/ue4-built-from-source-takes-170gb-disk-space/158081/17 "2023-12-15T13:49:12Z")

</div>

> [@jwatte](#):
>
> Is your git folder a shallow checkout? You probably don’t want all the old versions and separate branches.

I cloned only the 5.3 branch, using the following command that I got from [stackoverflow](https://stackoverflow.com/a/9920956/11665159):

```auto
git clone https://github.com/EpicGames/UnrealEngine.git --branch 5.3 --single-branch UE_5.3

```

> [@AActor\_424](#):
>
> I was able to reduce the build sitze from around 300GB to 160 GB. I think the mistake I made was that I built the entire solution instead of only the containig UE5 project.

I probably did the same accidentally, I’ll try to rebuild it as soon as I have some free time! Thank you for pointing this out!

It’s funny anyway because we’re happy that UE5.3 is “just 160GB” while the OP was complaining about its 170GB size 🤣

---

<div class="post-metadata">

**Author:** ![AActor\_424](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/aactor_424/32/630972_2.png) [@AActor\_424](https://forums.unrealengine.com/u/AActor_424)\
**Post date:** [December 23, 2023, 12:29am UTC](https://forums.unrealengine.com/t/ue4-built-from-source-takes-170gb-disk-space/158081/18 "2023-12-23T00:29:38Z")

</div>

> [@Ares9323](#):
>
> It’s funny anyway because we’re happy that UE5.3 is “just 160GB” while the OP was complaining about its 170GB size 🤣

Yes thats kinda funny xD But if we consider the possibilities that UE5.3 now has, this is relatively okay for me.
