How to safely remove unused wallet/exchange

Describe the problem:
Hi, I’ve now been using koinly for 2 years and tried a lot of different wallet/exchange and I would now like to clean up my account. The thing that makes it difficult is that I still haven’t sold my crypto. For instance I used coinbase pro 2 years ago to buy some coins and now they’re sitting on another wallet and I haven’t used coinbase ever since.
I assume that I can’t just remove the exchange because I would lose the cost basis of these purchases and next time I sell it would be treated as a 0 cost basis. My question is then, how could I safely clean up my account of these unused wallets and not loose all the cost basis ?

It would be awesome if Koinly had a baking feature where you could bake all your transactions into 1 document and even save it for safety. This document could then be added to the account as history and you could then safely remove all the exchanges or wallet you haven’t used since that doc has been created.

Which exchange/wallet is this regarding?
None specifically, it’s a general question.

How did you import data into this wallet?
API and CSVs.

What have you tried to fix this so far?
Nothing, I can’t think of a safe way to do what I want.

I’ve just tried to export all the transactions and reimport them on a new Koinly wallet and first of all, some transactions are not even processed and the result is not entirely correct. Comparing my account with all the exchanges and wallet vs the one with the Koinly generated transactions, some numbers don’t match up. I’ll be making another thread about this.

Anyway, the plan was to import Koinly generated transactions and then delete my unused wallets. However first big issue is that these generated transactions don’t play nice with existing wallets. On the dashboard I have twice the amount of coins I should have and on the tax report, the numbers are going bonkers.
If these Koinly generated transaction could merge nicely with existing wallets maybe it would be a solution to what I want to achieve. I guess for that Koinly would need some native support for this instead of needing to make a new wallet called Koinly.