In a billion years, the sun will start to run out of fuel and expand to become a red giant. Earth's oceans and atmosphere will be burned away, and Earth will likely be engulfed by the sun altogether. The sun will then shrink to a dim white dwarf, and all light and warmth in the solar system will diminish. In a hundred trillion years, the galaxy's ability to produce stars will be exhausted, and everything will turn dark. However, there's a way for life to escape this fateāand what's more, we wouldn't need to leave the planet to do it. We just need to build some safeguards.