Delete all unused assets

I´m currently working on a Tool to get rid of a lot of problems mentioned here. Right now the Tool is able to batch rename files, remove duplicates and relink everything correctly, sort all assets in appropriate folders, set linear color space for mask textures such as occlusion/roughness/metallic. Here is a link to the current state https://youtu.be/GFZeC59GMgs
The delete all unused assets is next on my list. It´s really a headache. If you guys have any further wishes please let me know!

-Edit: Updated the tool, everything runs smoothly now. Find the tread here.

2 Likes

There’s a simple python script

3 Likes

Is there any news on this feature request? I would very much like an option where if I delete a folder with many assets but some are still referenced in memory, then I can select not to delete the ones still being referenced in memory and delete the rest.

Have you read the above solutions? Or second solution, I noticed there is a marketplace item named ‘Clean Project’ which seem to do exactly what the name implies… :stuck_out_tongue:

I bought a plugin called Assets Cleaner which didn’t do a very good job of catching everything that were unused that I found manually. Unless I was using it wrong but I’ll take another look at it and maybe I’ll look at Clean Project if things get desperate.

https://www.unrealengine.com/marketp…-cleaning-tool
That is the tool you’re talking about Assets Cleaner (I made it)

It lists out every single assets that is unused and lets you filter/select/move or delete all or some of them

There are also ways in editor, using the statistics window and some extra work, or by doing a bit of Editor Widget blueprint in the Asset Registry module to get that to happen, but it’s quite time consuming and not very user friendly

Btw I’m very curious about how it didn’t find some of the assets you manually found, would you have any more details?
It’s been tested with quite a lot of users so far and it’s never had any issue
(you do have to refresh after you delete assets, to find new ones, because then assets that were depending on the deleted ones become unused)

I don’t know in which editor version this was added, but the “Show unused assets” option does exist in the Content Browser, under Filters > Other Filters > Not Used In Any Level. This applies to all Actors that are placed in the world and assets that are referenced through Blueprint by these Actors. For assets that are referenced in CPP, I’m not sure if they will be picked up by this filter.

Note, that if you change the contents in your scene, you need to save the scene, then disable and enable the filter again to reflect the changes in the Content Browser.

I am not sure if the other guys talking about what I am now, but in my case I need to get rid off the RESIDUE LEFTOVER DELETED UASSETS CREATED IN CONTENT FOLDER, which are not visible in the Content Browser anymore, like I have deleted some materials - yes, they were removed from the Content Browser BUT they are still there in the project Content folder/subfolders. Actually, I have no clue why is this “feature” there: I thought if I delete something from the Content browser it will be wiped out from the disk (Content folder) too.

So then I was scratching my head like for several hours WTF is going on here, when UE4 is telling me there already is material with the same name I am trying to assign to my new material, yet there definitely is not. Only to find out they stayed inside the Content folder/subfolders, so if one does not remove them manually one will not be able use the name of such object although it is not shown in the UE4 content browser…go, figure! :mad:

Using latest UE 4.25.3

@anonymous_user_ec808062 Are you use you did delete that not moved or renamed?
In the latter case, you probably got redirector left behind. You can easily clean up redirectors by using “Fix Up Redirectors in Folder” options on folder in Content Browser.
Redirectors are hidden by default, you can see them by checking “Show Redirectors” in Other Filters section of Content Browser filters.

[USER=“69”]Moth Doctor[/USER] yes, that was it - thank you very much for this, I did not know that! [SOLVED]

Still nothing?

+1, really need a menu(or button) for this

**Syed, **does this still works in 4.26.1? I tried migration process and everything except the level I want was migrated. Even copy/paste of the level from source project (messy one) to new (slim) does not show the level in content browser.

1 Like

+1 right here, i really love this +1 just apearing in space and is like '+1! let’s go!

Hi,

Content Browser, under Filters > Other Filters > Not Used In Any Level. :slight_smile:

Thank you Schusy I just had the same issue, saved me loads of time, and thank you Unreal for adding the feature.

9 Likes

it does not filter asset used in blueprints

There can be assets which are not used in any level specifically, yet are still necessary…

The easiest way to “purge” your project from unused assets is to take the levels and migrate them to a new project, then test, and archive the old just in case.