How To Remove Corrupted Cydia Sources

Cyfix script is out! Use it to effortlessly fix your Cydia repo errors. If you prefer to do this manually, follow the steps below.

You will need:

  • CyberDuck/WinSCP on a Mac/Windows (Google)
  • OpenSSH on your iDevice (Cydia)
  • SBSettings on your iDevice (Cydia)
  • A wifi network
  • How To SSH

If you’ve ever added a repo that you have no access to, or a repo that no longer works/exists, or perhaps entered a wrong url, you will have seen this error:
Sub-process bzip2 returned an error code (2)

Here’s how to fix that once and for all. Since they don’t show up in Cydia, you need to manually remove the sources.

Launch the SSH client on your computer and SSH into your iDevice’s filesystem.

Step 1:

  • Navigate to /private/etc/apt/sources.list.d and delete all files that contain the offending repo in the filename.
  • Open cydia.list for editing.
  • You will see lines that look like deb http://somerepo.url/ ./ Remove the line that has the offending repo url.
  • Save the file.

Step 2:

  • Navigate to /private/var/lib/apt/list and delete all files that contain the offending repo in the filename.

Step 3:

  • Navigate to /private/var/lib/apt/list/partial and delete all files that contain the offending repo in the filename.

Step 4:

  • Navigate to /private/var/lib/cydia and open the metadata.plist for editing.
  • Ctrl+F (or similar) for your offending repo url and delete all instances of it (it may appear more than once in the file).
  • Save the file.

Done.