Skip to content

Instantly share code, notes, and snippets.

@gilangvperdana
Last active August 21, 2024 02:56
Show Gist options
  • Save gilangvperdana/e1d8699f918b82949f49f10002c0b077 to your computer and use it in GitHub Desktop.
Save gilangvperdana/e1d8699f918b82949f49f10002c0b077 to your computer and use it in GitHub Desktop.
Search Online Package Linux

General

If you want to download offline package on your Linux you can use this command

1

apt-get --print-uris install package_name

will give you a list of urls for packages you need to download.

2

sudo apt install package_name --download-only
ls /var/cache/apt/archives

3

wget $(apt-get install --reinstall --print-uris -qq package_name | cut -d"'" -f2 | grep "/package_name_")

4

sudo apt-get install devscripts
dget package_name

5

apt serach package_name
PACKAGES="nfs-common"
apt-get download $(apt-cache depends --recurse --no-recommends --no-suggests \
  --no-conflicts --no-breaks --no-replaces --no-enhances \
  --no-pre-depends ${PACKAGES} | grep "^\w")

Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment