0

I am working in an air-gapped environment where there is no internet.

I would like to install certain packages that are in my home directory. These packages are put here through USB device. Now, I have 50 .deb files in my home directory. And I would like to install them using sudo apt install.

Can help me on how can I make the sudo apt install command recognize this path?

I am new to Ubuntu. So, can anyone provide step by step info please?

AdminBee
  • 22,803
The Great
  • 121
  • 1
  • 2
  • 7

2 Answers2

6

You can use different paths:

via apt - sudo apt install /path/to/package

or via dpkg - sudo dpkg -i /path/to/package

If you want to install all packages in directory you can use something like:

sudo apt install /path/to/packages/*
Romeo Ninov
  • 17,484
  • 1
    Tjanks, upvoted. Will this pick the dependencies as well? If they are in the same folder? – The Great Jul 06 '21 at 07:40
  • 1
    @TheGreat, check my edited answer – Romeo Ninov Jul 06 '21 at 07:41
  • I would like to install all 50 packages which contains their dependancies as well. Currently I wrote single sudo apt install command but it failed due to dependency. But all my dependencies are in the folder as well. How can I make the command recpgnize the dependencies and install approproately? – The Great Jul 06 '21 at 07:42
  • 1
    @TheGreat, the last command in my answer should do the work – Romeo Ninov Jul 06 '21 at 07:57
2

another way if all packages (with depencecies are in one folder)

sudo apt-get -o dir::cache::archives="Path/to/folder/with/debs" install what ever.

Only tested from me with apt-get not with apt.

nobody
  • 367