It’s not possible to reuse a deleted invoice number. The deleted records are kept (under “Deleted” at the bottom of the invoice overview) to prevent accidental deletion and also to keep an audit trail for HMRC.
This topic may be of interest:
http://community.quickfile.co.uk/t/cant-reuse-deleted-invoice-number/5625?u=qfsupport