Windows/Mac: SemiRestore is a new app for jailbroken devices that makes restoring your iOS device to a stock-like version as easy as a click of the button. With SemiRestore installed, you just need to run the app with your device connected to your computer.
SemiRestore will go through and clean everything up while retaining both your jailbreak and you current iOS firmware. This means it deletes all your apps, settings, jailbreak tweaks and everything else. You won't need SemiRestore often, but it's good if you need to troubleshoot some problems or if you've installed too many tweaks and want to start from scratch.