Factory reset without losing jailbreak?

I am going to sell my old iPhone 4 which is jailbroken on 5.1.1. If I do a factory reset, to clear all my info out of the phone, it won't force me to upgrade to 6.0 will it?
Yes, it will remove the jailbreak and update the phone to iOS6.
So what is the best way to clear out personal data and leave it jailbroken for the new owner?
So what is the best way to clear out personal data and leave it jailbroken for the new owner?

I wouldn't buy a jailbroken device from a 3rd party... too much risk there might be some unknown malware or something else illicit left over from the previous owner... but that's just me. Just restore it to factory settings and let the new owner do as they wish.
Gotcha! Thank you for the info!
If they want a jailbroken one, you can more than likely restore it to a clean 5.1.1 since you are already jailbroken and more than likely have 5.1.1 blobs...
A reset that you perform from the settings app to erase your data and settings does NOT remove your jailbreak. Only when you do a restore in iTunes or update your firmware will it remove your Jailbreak.
Sorry, apparently deleting all data and settings bricks your iPhone forcing you to restore in iTunes. You can however, delete just settings and it will be ok. I just delete all apps and go through stock apps to make sure im not signed in anywhere. Email, iTunes, appstore, etc..
Or just sync to a blank iTunes library.
Please help me,

I have 3gs & update a application in CYDIA but Phone was hang and now Apple logo show at start up. Please help me how to recover. i am using through jail break.

Original thread: https://forums.imore.com/threads/factory-reset-without-losing-jailbreak.241589/