How do you erase a Pokemon on Pokemon Pearl?

You can release it while holding it in the p.c. box.