I want to know if there is a way to configure APT to also download all the dependencies (as deep as the dependency spiral goes) of a package and cache them in /var/cache/apt/archives
.
EDIT:
It seems that using apt
instead of apt-get
causes no caches to be downloaded. Can anybody confirm this please?
WHAT I TRIED:
I tried installing texlive-full
with --install-recommends
and saw that there are 155 packages to install but APT only cached texlive-full.deb
.
Possible solutions:
Ask apt to install all those 155 packages which would cause them all to be cached. But this works only for dependencies that are one level deep.
Use
apt-rdepends
:
apt-get --print-uris --yes -d --reinstall install "$1" | grep "http://" | awk '{print$1}' | xargs -I'{}' echo {} | tee "$2"
This spits out the url of all dependencies of given packages ($1
) to a file ($2
) which can then be input towget
.
Although 2 is the most feasible solution, it costs me bandwidth by having to download packages twice. And I don't want to create a local apt-mirror using apt-mirror
.
This is likely the easiest method:
apt download $(apt-rdepends |grep -v "^ ")
No comments:
Post a Comment