Google said on Twitter that they will remove pages from their index if the page URLs show a 404 HTTP status code. Google also said that you should remove any internal links to those pages.
Returning a 404 result code for pages that you removed is fine (also make sure to remove any internal links to those pages).
— Google Webmasters (@googlewmc) January 6, 2020
How to check if your website links to non-existent pages
Use the website audit tool in SEOprofiler to check if your web pages link to non-existing pages on your website: