Assuming we want our sun to last as long as possible with a similar luminosity and assuming we value life over lifelessness can and should we manipulate the sun, gas giants and ice giants to that end? (This is for an advanced civilization in the future, not today.)
First the sun: I've read increasing the solar wind and coronal mass ejections is feasible, though of course challenging (to say the least!). If we can do this, our sun should 'last' longer on the main sequence since smaller stars last longer.
Second the ice giants: if we remove their Hydrogen/Helium atmospheres and also remove the Hydrogen from their ammonia and methane. Leaving behind their large rocky cores, water, some organics, and a N2, O2, CO2 atmosphere. (Made from the aforementioned ammonia, methane and water.) A large, cold, watery Earth should be left behind, though you'd likely need to remove even more water, which could be used to form a very large closely orbiting moon to increase tidal forces for much needed heat.
Third with the gas giants: I'll include the theoretical very distant icey 9th planet as well. We take all the Hydrogen, Helium, solar wind and coronal mass ejections and add them to Jupiter, Saturn and the 9th planet over time. This will increase their mass, increasing their infrared output to their moon's. Eventually they'd reach brown dwarf status at 13 Jupiter mass or so and start deuterium and lithium fusion, and at 65 Jupiter masses or so they start fusing hydrogen to helium.
All this should increase the habitability of Earth, the Jovian moons, Saturn's moon, Neptune and Uranus in the long term. (I understand other issues will exist for habitability for all these bodies, this mostly addresses the starting point.)