2

I used following method to install packages by local-repository

  1. mkdir /var/my-lcaol-repo and put all debs inside this folder
  2. Create /etc/apt/sources.list.d/my-local.list with deb file:/var/my-local-repo/ ./ and sudo apt-get update
  3. Install package(s) by sudo apt-get install [package]

All working fine but there is one problem:

If package which I'm tiring to install from local-repository (i.e /var/my-local-repo) is available from Repository that enabled (example: main or universe) then apt first tries to download packages from online repository and at that time I am not connected to internet , it fails to download archives and stops.

Temporary solution: Disable repository (ex- main or universe) then apt installs package from off-line repository. But I don't want to disable online repository.

Possible solution: Give first priority to off-line repository. How to?

Note: same package version (which is available on main/universe repo) is available in offline-repository

Pandya
  • 35,771
  • 44
  • 128
  • 188

0 Answers0