To delete a transaction you first have to ensure that the transaction is unpaid. If the transaction is paid (in any part) you cannot delete it.
This means you may have to delete any linked payments before you start on the deletion of transactions. Note that a transaction can have more than one payment if it has been part-paid.