NASA was forced to plan for the inevitable death of the exoplanet-hunting Kepler space telescope a few weeks ago. The spacecraft, which had already discovered literally thousands of new planets, ran out of fuel and couldn’t continue its science observations. Now, NASA has finally said goodnight to its trusty telescope.

In a new post NASA’s Jet Propulsion Laboratory explains what it had to do to officially send Kepler out to pasture. Believe it or not, it’s actually a bit more complicated than just flipping a switch.

According to JPL, the spacecraft’s empty fuel tank will prevent the spacecraft from doing more science work but it still needed a set of commands to make sure the telescope didn’t wake back up. Here’s how it went down:

Kepler’s team disabled the safety modes that could inadvertently turn systems back on, and severed communications by shutting down the transmitters. Because the spacecraft is slowly spinning, the Kepler team had to carefully time the commands so that instructions would reach the spacecraft during periods of viable communication. The team will monitor the spacecraft to ensure that the commands were successful. The spacecraft is now drifting in a safe orbit around the Sun, 94 million miles away from Earth.

The retirement of the Kepler is a bit of a bummer. The spacecraft has made so many incredible finds that it’s hard to accept that its incredible run is over. NASA is clearly feeling the same way and produced a nice retrospective video to wrap things up.

This obviously doesn’t mean the end of NASA’s exoplanet hunting efforts, and new hardware like the the James Webb Space Telescope should produce even more fantastic finds in the not-so-distant future.