ssis delete database on error
Not 100% sure what you are attempting here, but you could record the names of "partial" databases in a table in SQL and then run a separate process after the fact to drop them.