Use the jl_cmdr complete wipe. How do I wipe the BlackBerry using Jl Cmder? - BlackBerryFAQ
First, you follow the instructions, which include making sure your device is completely backed up. If you don't follow the instructions, don't even attempt it. How do I upgrade the OS on my BlackBerry? - BlackBerryFAQ
Then, you can reload your third party apps, etc., through Restore, Advanced, selecting those things you want. I would also recommend you sync your data fully, also, and re-sync upon completion.