I tend to decide the final title and URL (slug) of my posts right before I publish, but I often have some other working slug in place while I’m still editing. WordPress cleverly remembers that old slug even after I’ve changed it. That feature makes sense if someone changes the slug of a post that has already been published and wants any links to the old URL to still work. But for me it tends to leave a lot of junk slugs that were never meant to be accessed.
So how to remove them?
First, list the old slugs saved in the wp_postmeta table:
select * from wp_postmeta where meta_key = "_wp_old_slug";
To remove one, delete by its meta_id:
delete from wp_postmeta where meta_id = ##;
To remove them all:
delete from wp_postmeta where meta_key = "_wp_old_slug";
I highly recommend testing on a copy before doing any of this on a live WordPress database.