Please make sure you backup first!
Here is a script that you can run based on the batch numbers. Be aware this deletes the data used by reports also, so no sales data will show up prior to 2016, or whatever batch number you set SELECT @BatchNumberKeep = 12028 to. Also make sure to change the last part, YOURDATABASENAME, to the correct name
DECLARE @BatchNumberKeep int
SELECT @BatchNumberKeep = 12028
DELETE Shipping FROM [Transaction]
WHERE BatchNumber < @BatchNumberKeep AND Shipping.TransactionNumber =
[Transaction].TransactionNumber
--DELETE TransactionEntry FROM [Transaction]
-- WHERE BatchNumber < @BatchNumberKeep AND
--TransactionEntry.TransactionNumber = [Transaction].TransactionNumber
DELETE TaxEntry FROM [Transaction]
WHERE BatchNumber < @BatchNumberKeep AND TaxEntry.TransactionNumber =
[Transaction].TransactionNumber
DELETE SignatureCapture FROM TenderEntry
WHERE BatchNumber < @BatchNumberKeep AND
SignatureCapture.TenderEntryID = TenderEntry.ID
DELETE [Transaction] WHERE BatchNumber < @BatchNumberKeep
DELETE Journal WHERE BatchNumber < @BatchNumberKeep
DELETE TaxTotals WHERE BatchNumber < @BatchNumberKeep
DELETE TenderEntry WHERE BatchNumber < @BatchNumberKeep
DELETE TenderTotals WHERE BatchNumber < @BatchNumberKeep
DELETE Batch WHERE BatchNumber < @BatchNumberKeep
--DBCC SHRINKDATABASE (YOURDATABASENAME)
This process will take awhile depending on the data you have. You should do it when the store is not open. Also, BACKUP!!!. :P
And I always delete small range sets of batches, instead of all at once