Tidying up Ancient Sales Ledger Transactions

SOLVED

We have 777 Sales Ledger Accounts that haven't been used since March 2018 They have a balance of £111k which coincidentally is balanced exactly by a balance of £(111k) in a "Debtors" nominal account.

I would like to clear down these accounts and start using the Sales Ledger for current transactions.

I can't delete or mark the accounts as inactive because they have balances and the ones that don't have balances have unallocated transactions.

Can anyone advise?