Cleaning up Linux build (building from source)

Is there any automated process to clean all of the extra packages and files created during the build process? The entire unreal engine root folder is over 300GB in size (Building 5.3.2).

Is there a cleaning option or shell script that cleans up this folder and only keeps the built executables? I’m araid of just deleting random folders as UE may need it to execute/run.

Unreal Engine doesn’t provide a built-in automated process to clean up all the extra packages and files generated during the build process. However, you can perform a manual cleanup or use some common practices to reduce the size of the Unreal Engine root folder.

Here are a few suggestions:

  1. Intermediate and Saved Folders:
  • Inside your project’s folder and the Engine folder, there are typically “Intermediate” and “Saved” folders. These can be quite large and are safe to delete. They contain temporary and intermediate files generated during the build process.
  1. Binaries Folder:
  • The “Binaries” folder contains compiled binaries for different platforms. You can generally keep the binaries relevant to your development platform and remove others.
  1. Derived Data Cache (DDC):
  • Unreal Engine uses a Derived Data Cache to store preprocessed data. Over time, this cache can become large. You can delete the “DerivedDataCache” folder, and Unreal Engine will regenerate the necessary data as needed.
  1. Build Files:
  • Look for any leftover build files, log files, or temporary files created during the build process. These are usually safe to delete.