Share your love
Install a Package on Ubuntu without Internet – APT Offline
In this guide, we want to show you how to Install a package on Ubuntu without Internet Access using the apt-offline command. You can use apt-offline to manage your package installation and updates without an internet connection. Now you can proceed to the next steps to see how to use this helpful tool to install packages on Ubuntu without the internet. You can use this guide for any version of Ubuntu like Ubuntu 22.04 and Ubuntu 20.04.
- Learn To Install a Package on Ubuntu without Internet - Offline APT Package Manager
- Step 1 - Install apt-offline on Offline Ubuntu System
- Step 2 - Set a Signature File on the Ubuntu System without Internet
- Step 3 - Download a Package on an Online System
- Step 4 - Install Packages with apt-offline on Ubuntu without Internet
- Important Notes about Using APT Offline
Learn To Install a Package on Ubuntu without Internet – Offline APT Package Manager
Before you learn to use apt-offline to install your packages, you must install apt-offline on your Ubuntu server without an internet connection. If you don’t have it, proceed to the following steps to complete this guide.
Step 1 – Install apt-offline on Offline Ubuntu System
If you don’t have apt-offline installed on your server, you can download the package from a system with internet access and transfer it to your offline system. To get the package, you can visit the official website and get your desired package that is suited for your Ubuntu system.
Step 2 – Set a Signature File on the Ubuntu System without Internet
From your offline Ubuntu system, you need to generate a signature file for apt-offline. This file includes information about all the updates and packages needed by the system. To do this, you can use the following command:
sudo apt-offline set /path/to/signature-file.sig
Remember to replace the /path/to/signature-file.sig with your desired path and file name.
Step 3 – Download a Package on an Online System
At this point, you need to transfer the signature file you have created in the offline Ubuntu system to the system that has internet access.
Then, you can use the apt-offline command on your online system to download the required packages:
sudo apt-offline get -d /path/to/downloaded-packages /path/to/signature-file.sig
This command downloads the necessary packages and updates to the signature file.
Once your download is completed, you must transfer the packages to your Ubuntu system without an internet connection.
Step 4 – Install Packages with apt-offline on Ubuntu without Internet
At this point, you can easily install the transferring packages on your offline system with the following command:
sudo apt-offline install /path/to/downloaded-packages
Finally, run the system update to apply the changes:
sudo apt update
Note: The apt update command does not require an internet connection; it simply updates the system’s packages.
Important Notes about Using APT Offline
When you want to use an offline apt package manager, you need to consider the following notes:
- Be sure that the version of apt-offline is the same on both the offline and online systems.
- Also, be sure to use the correct signature path for apt-offline.
- You can transfer files between your offline and online systems with a USB drive.
Conclusion
With apt-offline, you can keep your Ubuntu system up to date and get the latest security updates and packages without an internet connection. At this point, you have learned that you can easily install your desired packages on Ubuntu without an internet connection.
Hope you enjoy it. If you need any help, please comment for us.
Also, you may like to read the following articles:
Upgrade Debian Kernel Without Network Connection
What sudo apt update and upgrade Do on Ubuntu / Debian
Fix APT Error Download is performed unsandboxed as root