Want a function to delete all assets that are not referred

Hi, I have added many images to my notes. But after I delete some images or pages, those images are still in the asset folder, which costs so much space. I wish there could be a function to delete those non-referred assets.

duplicate with View and delete orphan assets (which has more votes)