Folders safe to delete to recompile everything

I want to recompile everything from the project (classes, shaders…) as the project had many changes. When I’m building the project for shipping form I even get a warning saying that a file is old or something like that and I should delete it. And to do that I want to delete every file that is created either by building the project or when it is cooked. So which of the following folders can be deleted so they are recreated by UE (some I know can be deleted and recreated by using Generate Visual Studio project files but I included everything if someone doesn’t know and want to do the same):

.vs
Binaries
Build
Intermediate
Saved/Autosaves
Saved/Collections
Saved/Cooked
Saved/Crashes
Saved/Logs
Saved/MaterialStats
Saved/MaterialStatsDebug
Saved/Shaders
Saved/StagedBuilds
Saved/Temp
Saved/webcache_4147
Saved/ .tmp files

Global Local DDC Path
Global Shared DDC Path
Project Local DDC Path
Project Shared DDC Path

1 Like

Hey @Valentinvis

Unreal can create your project from

Config
Content
Plugins (if you use plugins)
Source (if C++ files are present)
*.UPROJECT file

so these are the folders/files to keep

2 Likes

Don’t forget Source folder too. My project is Blueprint type, and in Source is where C++ files are added when I create one.

I made a backup of the project and deleted all the folders I mentioned.

As a note if someone is doing this, don’t forget it will go through the process of Preparing Shaders all over again, which will take quite some time if the project is big. In my case is something I wanted, and had time to go through that process again.

1 Like

I meant Source but wrote Script, I am sorry. I edited the list.

For UE5 you can safely delete everything BUT:

Config
Content
Plugins
Source
*.uproject
*.sln
*.xcworkspace

I like to keep the *.sln (VSCode) and *.xcworkspace (Xcode) because there is no need to recreate them (they’re tiny).

Doing a rebuild recovered about 30 gigs of disk space for a project. Needless to say I was a little surprised.

3 Likes

Recreating the solution file does have its uses, I do it this way for auto detecting classes in UPlugins rather than adding them manually all the time. You dont need to save the entire Plugins directory, I think most people do this because its simpler but same as a UProject you can get rid of intermediate, build etc but you’ll need to add *.uplugin and make sure its searching for config, content, etc in the Plugin subfolders.