LiveScience has this article on how the Earth can be destroyed:
#2: Eaten by von Neumann machines
You will need: a single von Neumann machine
Method: A von Neumann machine is any device that is capable of creating an exact copy of itself given nothing but the necessary raw materials. Create one of these that subsists almost entirely on iron, magnesium, aluminum and silicon, the major elements found in Earth's mantle and core. It doesn't matter how big it is as long as it can reproduce itself exactly in any period of time. Release it into the ground under the Earth's crust and allow it to fend for itself. Watch and wait as it creates a second von Neumann machine, then they create two more, then they create four more. As the population of machines doubles repeatedly, the planet Earth will, terrifyingly soon, be entirely eaten up and turned into a swarm of potentially sextillions of machines. Technically your objective would now be complete - no more Earth - but if you want to be thorough then you can command your VNMs to hurl themselves, along with any remaining trace elements, into the Sun. This hurling would have to be achieved using rocket propulsion of some sort, so be sure to include this in your design.
So crazy it might just work.
Link (Thanks Tim Mosley!)