Joel ("On Software") Spolsky might say never. If you have a system that is smelly but working, then rewrites of individual subsystems lets you evolve the working system into something cleaner without any discontinuity of service.
Yeah, I've read that before, and other articles like it. Does the feeling of 'this code sucks, needs rewritten' ever go away after inheriting an old, smelly, but working codebase?