Skip to content

Instantly share code, notes, and snippets.

@Tatsh
Last active April 8, 2020 00:14
Show Gist options
  • Save Tatsh/5018960 to your computer and use it in GitHub Desktop.
Save Tatsh/5018960 to your computer and use it in GitHub Desktop.
Get the debs for everything installed
#!/bin/sh
# Get the debs for everything installed
test $UID -ne 0 && echo "Must be run as root" && exit 1
AUTO_INSTALL_DIR="/var/root/Media/Cydia/AutoInstall"
cd
dpkg --get-selections | grep -v -E 'gsc|cy\+|base|bash|dpkg|cydia|firmware|evasi0n|corona|racoon' | awk '{ print $1 }' > packages
apt-get clean
cat packages | xargs apt-get install --force-yes -y --force-reinstall true -d
mkdir -p "$AUTO_INSTALL_DIR"
echo "Save the deb files in /var/cache/apt/archives to somewhere safe!"
echo
echo "To re-install from a clean jailbreak with Cydia installed, copy all deb files to $AUTO_INSTALL_DIR"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment