Note: I’m using an iPod touch (4th Gen) with iOS 5.1.1 which is the most current version of iOS at the time of this writing. I am also using the Windows version of iTunes on Windows 7. But you can jailbreak it with your Mac too. Keep in mind that if you update your iDevice to a new version – iOS 6 for example, you’ll need to jailbreak it again.
Backup Your iDevice
Before doing anything, you’ll want to create a backup of your device first. Plug it into your computer and launch iTunes. Right-click the device when it appears and select Back Up.
Then wait for the backup process to complete.
Erase Your iDevice
Now you’ll need to erase your device. Navigate to Settings >> General >> Reset >> Erase All Content and Settings.
Enter in your Passcode if you have one set up.
Then tap Erase iPod and again when it asks to verify the Erasure.
Your device will reboot and when it comes back, you’ll need to go through the initial configuration steps you did when you upgraded to iOS 5.
The most vital selection to make during this is when you get to the Set Up iPod touch screen, select Set Up as New iPod touch (or whichever iDevice you’re setting up).