Don’t do it. First, something somewhere points to it, and broken links on the web are a tragedy.
Second, irrelevant is highly variable. You may find the post doesn’t have a lot of value, but to others it might.
The only reason I can think to remove old material is if it’s the result of a legal obligation or a financial limitation, and in the case of the latter I’d still try to keep it up.
What makes them irrelevant? I have many times valued old Stack Overflow answers or out of date blog posts because I also needed to work with older tech.
If it is truly no longer relevant then no harm in zapping it. Consider replying with a Status: 410 Gone for search engines and give a friendly page saying "This page has been intentionally deprecated due to lack of relevance" or something along that line. You can create a webmaster account on google and have it crawl your site again to purge the 410 content from the index.
Second, irrelevant is highly variable. You may find the post doesn’t have a lot of value, but to others it might.
The only reason I can think to remove old material is if it’s the result of a legal obligation or a financial limitation, and in the case of the latter I’d still try to keep it up.