How to clear unused linked-data (libraries) quickly I've got several assets files, which for some reason have unused linked-materials (from external other files). This results in a big list of useless "Libraries", visible in the Outliner, "Blender file" type of information.

I tried to delete the materials by hand, with Shift + Click on the "Unlink datablock" button, save the file, then reopen it, but materials are still there.



However, I tried to change the path of the linked libs by a non-existing file, directly in the Outliner, then saved the file and reopen it (twice). It worked. But too long and fastidious way to do that...



My question is : is there a quick way (with scripting or via UI) to auto-unlink unused things ?
Blender does not save unlinked datablocks. Thus linked datablock always has a user in the file it was linked from. To remove from your scene you must first click the make local button  and then it can be unlinked