In the 5e D&D PHB, the spell 'Animate Dead' states that:
The creature is under your control for 24 hours, after which it stops obeying any command you’ve given it.
3.5e 'Animate Dead' states that:
The undead remain animated until they are destroyed. (A destroyed skeleton or zombie can't be animated again.)
This suggests that the spell (as its affects are instantaneous) is therefore permanent. Unanimated Dead Creatures (objects) therefore transform into Animated Undead Creatures, and then when killed are 'destroyed', meaning they cannot be raised again as they are now Unanimated Undead Creatures.
Is there any mechanical way you can dismiss undead and have them return to a de-animated state as either dead objects or undead creatures? Would this hold past the 24-hour mark as it is technically a single, final 'command'? For the record, this pertains to 5e, I'm just referencing 3.5e as 5e is a bit ambiguous in the PHB as to undead duration and destruction.
The only consistent solution to get rid of spare undead seems to be allow control to expire and abandon them (thus setting evil undead free) or get the party to wail on them (which can be tedious and time consuming).