On Thu, 9 Aug 2018, Mike Miller wrote:

> Maybe the key is to use apt-get with the -d option:
>
>  -d, --download-only
>      Download only; package files are only retrieved, not unpacked or
>      installed. Configuration Item: APT::Get::Download-Only.
>
> Apparently, "apt-get -d install will download the given package and all 
> missing dependencies to the system packages directory 
> (/var/cache/apt/archives)." And this is best for use of "if you want to 
> 'pre-download' a set of packages for later installation."  Or so I'm told...
>
> https://askubuntu.com/questions/463380/difference-between-apt-get-d-install-apt-get-download
>
> So, maybe I can do that on the USB stick, then copy the downloaded files 
> over to the laptop, putting them in /var/cache/apt/archives.  If that 
> works, then I just need to know the command to install the 
> "pre-downloaded" files.  Any ideas?

It looks like the following command (no sudo needed) is a great way to 
grab all files needed for a package like dkms:

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

But I first had to install apt-rdepends:

sudo apt install apt-rdepends

It lists out all the dependencies.  There were 65 altogether for dkms. 
But when I ran it, this happened:

$ apt-get download $(apt-rdepends dkms | grep -v "^ ")
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Can't select candidate version from package libc-dev as it has no candidate
E: Can't select candidate version from package kldutils as it has no candidate

There are two other libc-dev packages:

libc-dev-bin
linux-libc-dev

So I'm not sure if libc-dev is real and needed.  And kldutils might have 
been usurped by kmod, which also is being installed.

So I dropped those two packages by grepping them out of the list like so:

apt-get download $(apt-rdepends dkms | grep -v "^ " | grep -vE '^(libc-dev|kldutils)$')

That ran and it gave me 64 .deb files.

So now I'll move those to the other machine and maybe I'll figure out what 
to do and maybe it will work.  Fingers crossed.

Mike