You don't have to delete the analog extension for that.
First you change the number of the analog extension with an unused number.
Second you change the number of the digital extension with the number that was at analog extension at the begining.
Thirth you change the number of the analog extension with the number that was at the digital extension at the begining.
The command (in maintenance mode)for change an extension number :
MOV REN xxxx to yyyy
where xxxx means the old number and yyyy means the new number.
The command (also in maintenance mode) with you can verify that a number is not assigned is :
LOC NUM zzzz
where zzzz is the number.