2

On a PC with no internet connection I have local .deb files of some packages stored in individual folders. At present I copy all .deb files of a package to var/cache/apt/archives/ then run sudo apt install package=versionto sort dependencies for me and to make sure the package would install the local version I have and not update. I do this for the rest of the packages I needed to install locally. My question would be is there a 'cleaner' way of doing this? I tried copying all my deb files to the var/cache/apt/archives folder and using

`# echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' \
> /etc/apt/apt.conf.d/01keep-debs`

To keep my deb files and at least install all the packages in one go instead of copying then installing individually. But the above does not work for me.

1 Answers1

0

The cleaner way would be to create your own private PPA, as outlined in this Askubuntu question or, perhaps better, this one.

Manually putting all the debs in the cache var/cache/apt/archives/ may indeed not be so "clean", but nevertheless can work if all required debs are locally present, and especially since you are also specifying the version to install: apt (or apt-get) first looks in the cache before attempting to go out on the internet.

vanadium
  • 88,010