Skip to main content

One post tagged with "apt"

View All Tags

· One min read

Method 1

$ sudo apt-get install --download-only <package_name>

All downloaded files will be saved in /var/cache/apt/archives directory.

$ sudo dpkg -i *

Method 2

if we have installed packages already, use the apt-rdepends

$ sudo apt install apt-rdepends

apt download $(apt-rdepends vim | grep -v "^ ")

if we get errors like this

E: Can't select candidate version from package debconf-2.0 as it has no candidate

delete version specified in name like this

$ apt-get download $(apt-rdepends vim | grep -v "^ " | sed 's/debconf-2.0/debconf/g')

Then

$ sudo dpkg -i *