What should you do?
"301 Redirect" the Old Post into a Related One
If a URL is still valuable because you have quality links pointing at that page, you can leverage that value by redirecting it to a related URL. A 301 redirect will tell search engines and visitors that there is a better or more recent version of the content on your website. You can use 301 redirects to redirect this page automatically.
Let's say you have an older post about a particular keyword tool. It is time to delete the post. The next step would be redirecting that post to a post about SEO tools. You can also choose to post about the best SEO tools for bloggers if you don't already have it.
While redirecting to the relevant category may be possible in certain cases, this should not be standard practice. Redirecting to the homepage is a bad SEO practice.
It's not difficult to create a 301 redirect (for example in WordPress), and it is simple with Yoast SEO. You can find all the additional features in Yoast SEO premiumif you don't already have them.
Search engines will be notified if you have intentionally deleted the content.
It's a good idea to inform Google that there's no relevant page on your website to redirect to. You can also give a "410 Deleted” status to Google. This status code will inform Google and other visitors that the content was not just deleted; it has been deleted for a reason.
Google will return a "404 not found" status to its search engine bot if it can't locate a post. In your Google Search Console, you'll see a 404 crawl error for the page. Google will eventually fix it and the URL will slowly disappear from search engine results pages (SERPs). This takes some time.
In the sense that it informs Google that the page has been deleted forever and will never be returned, the 410 code is stronger. You intentionally deleted it. Google will respond faster than a 404. If this sounds like gibberish, you can read more about server status codes.