Make them less prominent - don't remove them.
The skills you have accumulated are a measure of your intelligence, your adaptability, your work ethic, your ability to work out of your comfort zone, constant self-improvement etc. While they may not be 100% relevant to the job you're applying for, they indicate the type of person you are and what you can bring to the organisation. If it comes down to a head to head between you and another candidate you have no way of knowing what might break the tie - as such it makes sense to include anything that might give you an advantage.
What you should aim to do is mention non-relevant skills briefly and provide greater detail around skills that are more relevant. I think this is what people mean when they say "tailor your CV for the job". For example, for an architect position your CV would focus on languages and application design work you have done whereas for a team lead position you might highlight projects you've managed or time spent as a scrum master etc. I don't think it means remove anything that's not relevant entirely.
Even if you have spent a few years working in a completely different industry; list the position on your CV but don't go into any more detail than title, company and start end dates. It won't result in a gap on your CV you'll need to explain and it also shows a drive to improve or an open mindedness to