Download Ubuntu Packages For Offline Install
In this tutorial we will learn how to install local software packages (.DEB) in Debian and its derivatives such as Ubuntu and Linux Mint using three different command line tools and they are dpkg, apt and gdebi.
- Download Ubuntu Packages For Offline Install Free
- Ubuntu Package List
- Download Ubuntu Packages For Offline Install Windows 7
- Download Ubuntu Packages For Offline Install Windows 10
Apr 12, 2016 - You can only download and install the softwares for the same Ubuntu version. For example, If you download MySQL packages of Ubuntu 14.04. There is an another way to install packages in an offline Ubuntu system. Meet Camicri Cube, a portable package manager to download applications on any internet connected computers (Ubuntu Linux or Windows), and install them back on your offline computer.
This is useful to those new users who have migrated from Windows to Ubuntu or Linux Mint. The very basic problem they face is installing local software on system.
However, Ubuntu and Linux Mint has its own Graphical Software Center for easy software installation, but we will be looking forward to installing packages through terminal way.
1. Install Software Using Dpkg Command
Dpkg is a package manager for Debian and its derivatives such as Ubuntu and Linux Mint. It is used to install, build, remove and manage .deb
packages. but unlike other Linux package management systems, it cannot automatically download and install packages with their dependencies.
To install a local package, use the dpkg command with the -i
flag along with package name as shown.
If you get any dependency errors while installing or after installing and launching a program, you can use the following apt command to resolve and install dependencies using the -f
flag, which tells the program to fix broken dependencies.
To remove a package use -r
option or if you want to remove all its files including configuration files, you can purge it using the --purge
option as shown.
Remove Package in Ubuntu
To know more about installed packages, read our article that shows how to list all files installed from a .deb package.
2. Install Software Using Apt Command
The apt command is a advanced command-line tool, which offers new software package installation, existing software package upgradation, updating of the package list index, and even upgrading the whole Ubuntu or Linux Mint system.
It also offers apt-get and apt-cache command-line tools for managing packages more interactively on Debian and its derivatives such as Ubuntu and Linux Mint systems.
Essentially, apt-get or apt do not understand .deb
files, they are designed to primarily handle package names (for example teamviewer, apache2, mariadb etc..) and they retrieve and install .deb
archives associated with a package name, from a source specified in the /etc/apt/sources.list file.
The only trick to installing a local Debian package using apt-get or apt is by specifying a local relative or absolute path (./
if in current dir) to the package, otherwise it will try to retrieve the package from remote sources and the operation will fail.
Install Local Package Using apt-get in Ubuntu
To remove a package use remove
option or if you want to remove all its files including configuration files, you can purge it using the purge
option as shown.
3. Install Software Using Gdebi Command
gdebi is a tiny command-line tool for installing local deb packages. It resolves and installs package dependencies on the fly. To install a package, use the following command.
To remove a package installed from gdebi, you can use apt, apt-get or dpkg commands using purge
option as shown.
That’s It! In this tutorial, we have explained three different command line tools for installing or removing local Debian packages in Ubuntu and Linux Mint.
If you know any other way of installing local packages, do share with us using our comment section below.
Ubuntu has a lot of GUI-based methods for installing applications, but they take some time to search and find. Since the keyboard is usually faster than the mouse, managing your software via the command-line can be a real time-saver.
APT
Linux manages software through packages, individual units of software that contain user interfaces, modules, and libraries. Most applications link several co-dependent packages together, and still others allow you to choose which packages to install and which to leave out at your own discretion. This can get confusing, so there’s a package manager at your disposal to help
Each Linux distribution has its own package management system. For our own near and dear Ubuntu, it’s the Advanced Packaging Tool. It has a family of commands that allows you to add repositories; search for, install, and remove packages; and even simulate upgrades and such. The commands are fairly easy to remember and use, so you’ll be managing your system’s software in no time at all!
APT requires super-user permissions, as it deals with core aspects of the system, so in Ubuntu you’ll need to preface most commands with “sudo.”
Searching for Packages
The command to search for software is:
apt-cache search [search term 1] [search term 2] … [search term n]
Replace [search terms] but don’t use brackets. You’ll get an output like this:
You can search for terms in the description of packages, say for a solitaire game, or by package name. Some searches may yield a ton of results, so you can scroll through the list with the following command:
apt-cache search [search terms] | less
There’s a pipe in the middle of that command (it shares a key with ). The less command will allow you to scroll through your list with the arrow keys, page up/down keys, and space, b, and enter. Hit q to exit the list and go back to the prompt.
Adding Repositories
You can find more software in repositories found online. Take, for instance, Ubuntu Tweak, a program that lets you change some hidden or otherwise difficult-to-change settings for your system. It’s hosted at another repository. If you add the repository instead of downloading and installing just the package, the system will notify you of updates and automatically keep it up-to-date for you. You can manually add and change repositories by editing APT’s sources file:
sudo nano /etc/apt/sources.list
But Ubuntu 9.10 Karmic Koala changed that. There’s an easier way!
sudo add-apt-repository [repository name here]
Let’s look at Ubuntu Tweak’s repo to see what it’ll look like in practice:
sudo add-apt-repository ppa:tualatrix/ppa
Voila!
Updating Sources
After adding repositories, you have to update your package list.
sudo apt-get update
That will update the package lists from all repositories in one go. Remember to do this after every added repository!
Installation
Now that you’ve added your software repo and updated your package list, and found the package name you need, you can install it.
sudo apt-get install [package name 1] [package name 2] … [package name n]
This will download and install all of the packages listed. If there are dependencies – other prerequisite packages – they will also be installed. Sometimes you’ll also see a list of recommended but optional packages to go along with your selection. Sometimes, you’ll also see a confirmation prompt, though not always.
Often, you’ll see a core package with other linked packages, so installing this one will automatically install the dependencies and sometimes its associated packages, too.
Removing Packages
If you want to get rid of a program, you can uninstall its associated packages.
sudo apt-get remove [package name 1] [package name 2] … [package name n]
If you want to get rid of the configuration files and associated directories (usually in the user’s home directory), you’ll want to add the purge option:
sudo apt-get remove –purge [package name 1] [package name 2] … [package name n]
There are two dashes there. This will come in handy if a program isn’t working properly. By purging upon removal, you’ll can have a “clean” install.
Most of the time, you can just choose the core package and the associated ones will be removed as well. If it doesn’t, you can use the following command:
sudo apt-get autoremove
This will automatically remove any packages that aren’t used or associated with any installed program. For example, if you got rid of a core package, autoremove will get rid of it’s associated packages and any dependencies it had, so long as no other program is using them. It’s a great way to clean up any unused libraries and packages you don’t need.
Upgrading Software
So, what if your packages need upgrading? You can upgrade individual programs with the following command:
sudo apt-get upgrade [package name 1] [package name 2] … [package name n]
Or, you can upgrade all packages by having no further arguments:
sudo apt-get upgrade
This will tell you how many and which packages need updating and will ask for a confirmation before it continues.
Remember, you may need to update first. Upgrade will replace older versions of programs with their newer versions. This is a replacement process; the same package name is required and the older version is replaced with a newer version. No completely new packages are installed and no packages are uninstalled.
Some programs don’t quite work that way. They require a package with a slightly different name to be removed and a new one with a different name to be installed. Sometimes a program’s new version has a new required package. In these cases, you’ll need to use dist-upgrade.
sudo apt-get dist-upgrade [package name 1] [package name 2] … [package name n]
sudo apt-get dist-upgrade
Now, all of the dependencies will be satisfied no matter what. If you aren’t into micro-managing your packages, then this is the command you’re going to use.
If you only want to see which packages will be upgraded if you were to hypothetically run the command, you can simulate an upgrade with the –s option.
sudo apt-get –s upgrade
This is really useful if you aren’t sure if upgrading one package will mess up other programs, which happens occasionally with things like PHP and mail server libraries.
Cleaning
When you download packages, Ubuntu caches them in case it needs to refer to them further. You can delete this cache and get back some hard drive space with the following command:
sudo apt-get clean
If you want to get rid of your cache, but save the newest versions of what packages you have, then use this instead:
sudo apt-get autoclean
This will get rid of the older versions which are pretty much useless, but still leave you with a cache.
Checking What’s Installed
You can see a list of all your installed packages with dpkg.
sudo dpkg –list
You can also use less to scroll through this list.
Download Ubuntu Packages For Offline Install Free
sudo dpkg –list | less
You can also search through the list with the grep command.
dpkg –list | grep [search term]
If something is installed, you’ll see a package name and a description.
You can also search through a more compact method:
dpkg –l ‘search term’
That option is a lowercase letter L, and your search term must be inside single quotes. You can use wildcard characters to search better as well.
Easter Egg
APT has an interesting easter egg.
Ubuntu Package List
sudo apt-get moo
Enjoy your super cow powers!
Download Ubuntu Packages For Offline Install Windows 7
Being able to manage packages and installed software via command-line can save you some time. Ubuntu’s Software Updater is often laggy on my system and it can really be a pain to have to add software repos and install packages through the Software Center, especially if you know the package names already. It’s also great for managing your system remotely via SSH. You don’t need to have a GUI running at all or deal with VNC.
Download Ubuntu Packages For Offline Install Windows 10
There are a lot of things to learn when getting comfortable with the command-line, so you may want to check out The Beginner’s Guide to Nano, the Linux Command-Line Text Editor. There’s more to come!