Originally Posted by daianz
don't do it!!!!!! you will brick your jailbroken phone.
the best way to do it is to create a fresh backup on itune with nothing in it and restore your iphone to that backup. it will erase all personal data
Yup what daianz said. If you erase all content on a JB iphone, it bricks it good and proper and the only way to then get it back is to do a official restore, no 2 ways about it.
Make a custom ipsw using sn0wbreeze (pc) or pwnage tool (mac). Then also use redsn0w 0.9.6b to put your phone in special DFU mode to restore to custom ipsw. That will erase your data