When you make a change to a post slug permalink after its been published, WordPress will automatically redirect it to the new post slug (doing a 301 redirect). This works well, but sometimes you want no existence of the old post slug. These SQL statements will help you cleanup your old post slugs.
If you are interested, like I am, in setting up your own web server and hosting your own projects then I hope you will follow along. This guide will walk you step by step on setting up a LEMP stack (Linux, Nginx, MySQL, and PHP).