More and more you run a Blender project you end up with lots of unused materials and files that bloat and slow down your project, but instead of saddening-on it’s time to learn about the Purge function that rids you off all that woe.
Open up your project and find the icons on the top right, where usually you’re in ‘View Layer’ Display Mode. Change it to Orphan Data and navigate to the top right where ‘Purge’ is waiting. Then it’ll ask if you want to proceed and you just click under the ‘OK?’ prompt. Ta-ta!