Home Package management How To Install Software Offline In Ubuntu

How To Install Software Offline In Ubuntu

By sk
Published: Last Updated on 6.7K views

This brief guide explains how to install software offline in Ubuntu and its derivatives such Linux Mint, Elementary OS and Pop OS using Synaptic package manager.


Installing packages offline in Ubuntu is easy! What we are going to do now is download a software along with all its dependencies from any Internet-enabled system, and copy the downloaded files and install them in the offline Ubuntu systems. It may sound big task but it is quite simple.

There are few software, such as Camcri Cube server, already does this job pretty well. However, this method is much easier than all other methods. All we need is just a Synaptic package manager. For those who don't know, Synaptic package manager is the graphical front-end for APT package manager. Using Synaptic we can easily install, update, and remove packages in DEB based systems.


So, why on the earth do we need to do this? To save Internet bandwidth, of course!

Let us say we have 100+ Ubuntu systems, and we need to install MySQL server in all those systems. We all know this will consume lot of Internet bandwidth. So, why don't we just download a software with all required dependencies in only one system, and copy and install them in the rest of the systems?

It doesn't matter whether the other systems have Internet connection or not. Sounds, logical? Indeed. This method will save you a lot of bandwidth!

You might have some questions.

I have downloaded the software for Ubuntu 20.04 version, and I want to install them in Ubuntu 22.04. Is it possible?

No, you can't! You can only download and install the software for the same Ubuntu version. For example, If you download MySQL packages of Ubuntu 20.04, and try to install it on Ubuntu 22.04 LTS, It will not work.

My system doesn't have Internet, and Synaptic manager. Can I still install software using this method?

No! This method is intended to save the Bandwidth. Your system must have Synaptic installed. Otherwise this method won't help. Or else, you can download the .deb file, and try to install it. But sometimes, .deb file will also require dependencies. In such cases, there is no way to install any softwares offline. The Internet connection is mandatory.

Clear? Well, let us get into the topic.

Install Software Offline In Ubuntu

I tested this on Ubuntu 16.04 LTS desktop. However, It should work all DEB based systems as long as they have Synaptic package manager installed. As you all know, we can install Synaptic, using the following command:

$ sudo apt-get install synaptic

For the purpose of this tutorial, I will be using two Ubuntu desktops.

  1. Lubuntu 14.04 LTS desktop (Internet enabled)
  2. Ubuntu 16.04 LTS (Synaptic package manager installed, and don't have Internet)

For the sake of simplicity, let us call the Lubuntu (Internet-enabled) system as online system, and Ubuntu 16.04 LTS  desktop as offline system.

Steps to do in offline system

First go to the Offline system, and open Synaptic package manager. Search for the packages you want to install. For example, let us install MySQL server. Enter mysql in the search box. You will see the list of suggestions. Choose MySQL server package from the list, and select Mark for installation.

Mark packages for installation in Synaptic package manager

Mark packages for installation in Synaptic package manager

Once you selected the mysql server, the synaptic package manager will automatically select the additional required dependencies. Click Mark.

Mark additional packages for installation in Synaptic package manager

Mark additional packages for installation in Synaptic package manager

As you see in the above screenshot, Synaptic has automatically selected the required dependencies for the mysql server.

Next, go to File -> Generate package download script from the Synaptic package manager. Save this script on any folder of your choice with extension .sh. Please note that you must save this file with .sh extension.

For example, I saved this file (Ex. mysql.sh) in a folder called mysql_install.

Save download script

Save download script

This script contains the download URLs of all software that you marked for installation.

Now, copy this entire folder to a USB drive or any other medium, and go to the online (Internet enabled) system.

Steps to do in online system

Cd to the mysql_install folder, and make the script as executable:

$ cd mysql_install
$ sudo chmod +x  mysql.sh

Finally, run the script using command:

$ ./mysql.sh

The above command will download mysql server with all dependencies, and save them inside mysql_install folder.

Mysql and its dependencies

Mysql and its dependencies

Once you downloaded all softwares, copy this entire folder to the USB drive or any other medium of your choice. Also, keep this folder safe if you want to install MySQL server on multiple systems.

Go back to Offline system

Again, go back to the offline (Ubuntu 16.04 LTS) system, and open Synaptic manager.

Go to File -> Add download packages.

Add downloaded packages in Synaptic package manager

Add downloaded packages in Synaptic package manager

Select the location of the folder that contains the downloaded files, and click Open.

Select package source directory

Select package source directory

That's it. Synaptic will ask you to install the downloaded packages. Click Apply to install them.

Apply package updates

Apply package updates

The software will start to install in offline.

Installing software in offline Ubuntu

Installing software in offline Ubuntu

Similarly, you can install any software on your offline Ubuntu desktop.

Also, you can copy the downloaded files, and paste them in /var/cache/apt/archives/ folder. Then search package that you want to install from Synaptic and install it.

Don't forget to keep the downloaded files in a safe location to use them later in any other offline systems.

Related Read:

You May Also Like


TheVeryTech June 12, 2017 - 4:01 pm

Thank you, I’ve found this very helpful!

Kevin March 6, 2019 - 8:07 am

Thank you! This is very helpful!

alen July 19, 2019 - 7:41 pm

You are an incredible teacher.
I searched for this topic for days and you have made it as easy as possible. I am so grateful.


Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More