The hatches between Discovery and the International Space Station will close Sunday afternoon, and the shuttle will undock first thing Monday.
Both crews worked to rejuvenate the space station's air system. The oxygen generator as well as the carbon dioxide removal system have been acting up.
They also made sure a Japanese cargo carrier was loaded properly with garbage.
The supply ship will be let loose at the end of this month and plunge through the atmosphere, burning up. The vessel is full of packing foam and launch restraints from all the equipment that was delivered by Discovery. The foam encasing the humanoid robot R2 will be stuffed in as well, once the astronauts unwrap it.
R2 is the first humanoid robot in space. It was part of the new stowage unit delivered last Saturday by shuttle Discovery.
Mission Control gave Discovery's six astronauts two extra days at the 220-mile-high lab -- for a total of nine days -- to help with all the unloading and repair work.
Flight director Royce Renfrew said Saturday evening that he was "ecstatic" with how the mission has unfolded. The extra days were well-used; the new storage compartment is now empty of shuttle-ferried cargo and ready to be used as intended, he said.
"I couldn't be happier," Renfrew told reporters.
It's the last voyage for Discovery, NASA's oldest and most-traveled shuttle. The spaceship will be retired following Wednesday's planned touchdown and sent to the Smithsonian Institution for display.
Only two more shuttle missions remain. Endeavour is set to soar in mid-April, followed by Atlantis at the end of June.