How to delete spamy / hidden pages in WordPress and backlinks

I am working on a website and last month we had some viruses that made 1k spammy pages or hidden pages.

My question is how can we delete those pages.

I want to tell you that Moz/Ahrefs/SEMRush found those pages but when I click the link it goes 404.

Go to Source
Author: Flavius Noja