Skip to content

Instantly share code, notes, and snippets.

@szepeviktor
Created December 24, 2024 15:34
Show Gist options
  • Save szepeviktor/72e75bd446a91c7424987413394b0c55 to your computer and use it in GitHub Desktop.
Save szepeviktor/72e75bd446a91c7424987413394b0c55 to your computer and use it in GitHub Desktop.
Download all packages (cache locally) from a Debian APT repository
# List repository origins
apt-cache policy | sed -n -e 's#^\s\+release .*o=\([^,]\+\).*#\1#p'
# Download all package (cache)
aptitude search -F "%p" "?origin(${ORIGIN})" | xargs -- apt-get install --download-only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment