Do I delete every package on Cydia before deleting it, including the built in ones?

I have an out of service iPhone 4 my cousin gave to me, and I want to delete the jailbreak from it, because I'm aware that her (old) phone is very slow, and its more than likely the jailbreak. My question is, do I delete every single package before deleting Cydia, like the built in ones? Because I was working on it and I was about to delete one of them and it said something like: "Essential Package" and it gave me a choice Delete (unsafe) or keep (safe). I was just afraid I might mess up the phone before even using it if I don't delete the jailbreak correctly, because I've heard that deleting it incorrectly can lead to a brick. It runs iOS 5.1.1, and I want to update it to iOS 7.1.2. But I also read that it can brick up your phone if you try to update your iOS with jailbreak on it, and I don't want that to happen. (I'm not going to restore the phone, but I'm going to delete the Cydia Installer package). I watched tutorials on how to do them, and I know to delete every tweak/package, but they didn't make it clear, delete EVERY SINGLE ONE or just the ones you downloaded? Thank you guys, and please also tell me the ones not to delete.

You won't have to if there's an update available. Updating is one way to get rid of a jailbreak. I haven't done this however I have heard it is a way.