There’s never a good bathroom around when you need one. Just ask Ken Mattingly, Apollo 16’s command module pilot. In a transcript dated June 23, 1972, Mattingly joked with crew members about the capsule’s cramped conditions: “Man, one of the feats of my existence the other day was, in 42 minutes, I strapped on a bag, went out of both ends, and ate lunch…. I used to want to be the first man to Mars. This has convinced me that, if we got to go on Apollo, I ain’t interested.”

“Available space is everything,” explains Valerie Neal, a curator in the space history division of the National Air and Space Museum. “On Mercury, Gemini, and Apollo, the crew members practically wore the capsules. They lived in their seat, and everything that was personal they did in their seat. They ate there, and slept there, and urinated and everything else there.”

Urine was collected in a receptacle that attached to the body with a condom-like pouch that came in “small,” “medium,” or “large.” Gemini and Apollo astronaut Michael Collins wrote in Carrying the Fire that the gadgets were “always referred to in more heroic terms: extra large, immense, and unbelievable.”

For bowel movements, the astronaut would first tape a plastic bag to his buttocks. When he was done, he would seal the bag, then knead it in order to mix a liquid bactericide with the contents. Small wonder that a NASA memo reported, “The Apollo waste management system worked satisfactorily from an engineering standpoint,” but from the perspective of the crew, “the system must be given poor marks.”

Everything changed with the advent of Skylab. “Skylab was the equivalent of a house as compared to the equivalent of a cockpit, and so there was room to have defined areas,” says Neal. “There was a wardroom for eating, and sleeping compartments, but most important there was actually a waste management compartment.”

Skylab had “an innovative toilet,” Neal continues. In space, “water doesn’t stay confined and flow in one direction, like down; it just forms into great big globules and spheres. So they developed a toilet that operated with a fan and vacuum suction.”

The Skylab astronauts were also test subjects for a variety of experiments. Scientists wanted to determine if the astronauts’ bodies were processing nutrients properly in weightlessness, and if their bodies were losing calcium or other minerals. To answer these questions, they had to regularly capture urine and stool samples for analysis.

“Had bad experience today,” wrote astronaut Alan Bean in his Skylab diary. “Sneezed while urinating—bad on Earth—disaster up here.” (Sneezing or passing gas sent astronauts tumbling about the station.)

The space shuttle’s toilets are based on the Skylab model, and also operate with a fan and a vacuum. “No matter how much training you’ve had on the ground in how to operate it,” says Neal, “it’s difficult to actually use the first time. So when you finally do succeed, there’s a bit of celebration; they announce to everybody, ‘Okay, I went!’ It’s an accomplishment to master it in microgravity.” And until astronauts learn to operate the system by rote, there are step-by-step instructions.

The International Space Station’s toilets are based on the Russian Salyut model, which also uses a fan and vacuum. Engineers on board the space station are conducting experiments to separate urine from feces in order to recycle the water. “It’s a major long-term concern,” says Cathy Lewis, a curator in the Museum’s space history division. “After fuel for launching, water is the second-heaviest component that needs to be carried in order to preserve life. If they can recycle waste in any way, it would save them a great deal.”

What’s the future for space toilets? “The current system works well enough,” says Lewis. “I wouldn’t say pretty well. No one seems to like it, but there aren’t really any alternatives.”