If you have read EID Root Key (ERK) on CFW, you can clear cache partition on PC. If you does not have, you need format HDD...
If you don't have ERK but have CFW or your PS3 is a model which can install it, then make sector by sector kind the disk image before formatting (because later you will be able to retrieve data from that image).