If you have posted everything through the purchase invoice instead of posting anything or the purchase orders you should simply be able to delete the purchase orders.
And if you have posted everything through purchase orders and nothing is posted from the purchase invoice then you can simply delete the unposted purchase invoices.
The real challenge is if you have posted part of the invoice in one place and the complete invoice in another place.
Then you have some serious "cleaning" to do in your data. And that is something you should seek advice for from a partner that can look into your data. If you start making corrections without being 100% certain of what you are doing you can easily end up with a bigger mess than what you started with.
So please seek advice from a Business Central partner for assistance in this case.