NASA just recycled 98% of all astronaut pee and sweat on the ISS
space.com
space.com
I know it's insane but mining water in space and sending it back to earth seems to be one of the best options.
Edit: If you're down voting can you let me know why?
They can use it as fertilizer.
Getting that last 2% of water out of the solution to leave a completely anhydrous substance gets energy expensive. Also, some things are better left in solution (ammonia for example) making them easier to move around and deal with.
It's not "it can't be done." It's a "it gets prohibitively expensive on a limited energy budget."
Note that you're going to be left with things like anhydrous ammonia when you're done. That is more difficult to work with than concentrated ammonia in solution. In a sealed environment, this becomes even more of a concern.