For accounting and fiscal purposes, you cannot delete a closed sale.
But you can create a reverse sale as a counterpart of the closed sale. It will be the negative copy of the sale to cancel.
In the Payment section of the sale, click on the 'Cancel sale' button.
Then confirm and the reverse sale will be automatically created and validated.
Check that the payment methods of the reverse sale balance the ones from the canceled sale.
Products from the initial sale are returned into inventory. In counterpart, credit lines are created and added to a new sale (the reverse sale). Finally, the reverse sale is validated.
If at least one product of the sale to cancel has already been exchanged, you cannot create the reverse sale automatically.
You will have to create the reverse sale manually following the same process as issuing a refund. More information.