# How ro reduce .pdb file size when packaging project?

**URL:** <https://forums.unrealengine.com/t/how-ro-reduce-pdb-file-size-when-packaging-project/496016>\
**Category:** C++\
**Tags:** linker-error, unreal-engine, CPP, Blueprint, UE4-27, question\
**Created:** [February 9, 2022, 8:45am UTC](https://forums.unrealengine.com/t/how-ro-reduce-pdb-file-size-when-packaging-project/496016 "2022-02-09T08:45:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zablas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@zablas](https://forums.unrealengine.com/u/zablas)\
**Post date:** [February 9, 2022, 8:45am UTC](https://forums.unrealengine.com/t/how-ro-reduce-pdb-file-size-when-packaging-project/496016/1 "2022-02-09T08:45:39Z")

</div>

Hello. This is probably the closest forum category for this kind of question so I’ll ask it here. Basically, I have my project nativized and it has 1620 .cpp modules being generated during nativization. The problem is that the .pdb for that many modules is 4.41GB in size and then the linker throws an error saying:

LINK : fatal error LNK1201: error writing to program database “PathHere” check for insufficient disk space, invalid path, or insufficient privilege

And I’ve already figured out that it’s the size of .pdb causing this because when there were less modules, deleting it helped resolve the issue. Now it doesn’t. Is there a way to make it smaller?

---

<div class="post-metadata">

**Author:** ![MicroMonitor](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/micromonitor/32/924297_2.png) [@MicroMonitor](https://forums.unrealengine.com/u/MicroMonitor)\
**Post date:** [September 6, 2023, 9:27pm UTC](https://forums.unrealengine.com/t/how-ro-reduce-pdb-file-size-when-packaging-project/496016/2 "2023-09-06T21:27:48Z")

</div>

Modifying your .Target.cs file with these options can help make the pdb size smaller.

```auto
WindowsPlatform.PdbPageSize = 8192; // allows for PDBs greater than 4gb
WindowsPlatform.bStripUnreferencedSymbols = true;
WindowsPlatform.bMergeIdenticalCOMDATs = true; // we need the pdb space and have to pay the extra link time cost
bDisableDebugInfoForGeneratedCode = true;
// make sure PDBs are always regenerated.
bSupportEditAndContinue = false;
bAdaptiveUnityEnablesEditAndContinue = false;
bUseIncrementalLinking = false;

```

Another option could be to use:

```auto
bUsePDBFiles = false;

```

which puts the debug information in the .obj file. For more information on what these are doing you can take a look at:

> **[Shrink my Program Database (PDB) file - C++ Team Blog](https://devblogs.microsoft.com/cppblog/shrink-my-program-database-pdb-file/)**
>
> Overview PDB’s (Program Database file), PDB stands for Program Database, a proprietary file format (developed by Microsoft) for storing debugging information about a program (or, commonly, binaries such as...

Which is a great microsoft blog post on the topic

---

<div class="post-metadata">

**Author:** ![BorodMorod](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BorodMorod](https://forums.unrealengine.com/u/BorodMorod)\
**Post date:** [August 2, 2024, 7:10pm UTC](https://forums.unrealengine.com/t/how-ro-reduce-pdb-file-size-when-packaging-project/496016/3 "2024-08-02T19:10:40Z")

</div>

Does it work for Epic Games Launcher build or for source only?  
Have tried all options, even

```auto
bUsePDBFiles = false;

```

No results on launcher build
