The waste extraction was a 24th century term describing the toilet aboard starships and starbases. The waste extraction system was the system used to manage and process that and all other related wastes.
In 2151 Worley Elementary School in Kenmare, County Kerry, Ireland on Earth, sent questions, letters, and drawings to the starship Enterprise. One question asked was "When you flush the toilet, where does it go?" and one of the few that was answered personally — Captain Archer delegated it to chief engineer Charles Tucker. Commander Tucker was not pleased with the captain's selection of questions for him and protested, but ultimately relented and explained to Molly the ship's processes of recycling and biomatter resequencing. (ENT: "Breaking the Ice")
The brig aboard Starfleet ships included facilities such as a sink and toilet, which were enclosed behind the wall until needed. A sign above the toilet read "Do not use while in spacedock." ("Star Trek V: The Final Frontier")
On Ferenginar, Quark and Rom's Uncle Pax made a fortune in the waste extraction business; consequently he was also known as "Uncle Stinky". It was said that in the Nagal Residence, the waste extraction fixtures were plated with latinum. Quark, believing that he was about to become the next Grand Nagus, said that the first thing he was going to rip out the plated fixtures and replace them with solid latinum fixtures. (DS9: "Body Parts", "The Dogs of War")