This will require a bit of hand coding to accomplish.
you will need to add code to the confirm page to lop through the purchased items in the database and update the available quantity , if the available quantity drops to zero, delete that item instead of updating it.
it should not be too difficult if you are familiar with hand coding php and writing SQL statements, but we will not be able to offer much support for this.