Install Deb Package On Arch Linux Screenshots

Arch Linux has become a popular Linux distribution because of its split between usability and control. It offers all the tools a power user needs to maintain complete control over his system, yet it also provides newbies with the helpful instruction guides on how to complete nearly any task.

Sudo apt install./.deb # If you're on an older Linux distribution, you will need to run this instead: # sudo dpkg -i.deb # sudo apt-get install -f # Install dependencies. Installing the.deb package will automatically install the apt repository and signing key to enable auto-updating using the system's package manager. How do I install.deb package from the terminal using command line option in Ubuntu Linux or Debian Linux? You need to use the dpkg command, which is a package manager from shell/command prompt for Debian and Ubuntu Linux. Now we can install VirtualBox on Arch Linux using Pacman package manager. On Arch Linux, the latest version of VirtualBox will be downloaded if you use pacman package manager. There is no easy way to install VirtualBox from the official website of VirtualBox like Ubuntu, Debian.

One thing newbies often forget, though, is that no matter how user-friendly their new Gnome desktop running Firefox and LibreOffice may be during the work day, leftovers from those and other installed packages can fill up disk space over time.

When you upgrade programs with Arch Linux’s package manager Pacman, you need to periodically clear its cache. Otherwise, your hard disk will fill with unwanted and unneeded old packages. This tutorial will show you how.

Related: 5 Ways to Make Arch Linux More Stable

What Is the Package Cache Anyway?

Arch uses Pacman, like with pacman -S firefox, to install a package from the Arch repositories. In the case of that command, the -S option tells Pacman to look for a compressed tarball (a tar.xz file) named “firefox.” If it finds a newer version than what is installed on the user’s computer, Pacman then offers the option to install the newer package.

This type of operation often happens automatically for multiple packages when you run the full system upgrade command pacman -Syu, using -y to download the latest repository list of available packages, -u to find all out-of-date packages on your computer, and -S to install any new packages Pacman finds.

For any new package Pacman first downloads the tarball into its cache directory – usually at “/var/cache/pacman/pkg/” – and then uses that file to install the new version. The history of previously-installed packages might look something like the following image.

It’s clear from this screenshot that Firefox doesn’t take up a lot of room by itself. Across six packages, it only uses a few hundred Mb of room. However, that same hundred megabytes across several hundred packages can begin to accumulate to undesirable levels.

Install deb package on arch

Upon closer inspection, the entire package cache on this system reads 4.8 GB. It’s time to clear some space.

How to Clear the Cache

The screenshot above also reveals that Pacman doesn’t automatically delete the old tarballs when new packages are installed. It also leaves tarballs alone when you delete packages. Therefore, you must clear the cache manually.

There are multiple ways you can proceed. First, you can use pacman itself:

This option will delete all the cached packages in “/var/cache/pacman/pkg/” except for the versions matching packages installed on your system. There are some dangers to this approach which are covered in the following section.

For a safer, more controlled approach, you can use the paccache script, which is provided with any Pacman installation.

removes all cached tarballs except for the most recent three packages. It does this for all packages that are and are not installed on your computer.

You can now see that the script has removed a large portion of this system’s cache. It also left three copies of Firefox in the cache directory.

lets you choose the number of packages you want to keep. In this case the choice of “1” emulates much of what pacman -Sc achieves, except that paccache still doesn’t discriminate between installed and uninstalled packages.

gives you control over uninstalled packages by removing the tarballs of all packages not currently installed on your local workstation.

Related: How to Install Deb Package in Arch Linux

Arch

Dangers of Cache Clearing

Although it’s largely a good idea to clear unneeded packages from time to time, you can run into problems if you’re overzealous.

Note first that pacman -Sc will delete the tarballs of packages not currently installed on your computer. Therefore, if you deleted Firefox but wanted to install it at a later date but then told Pacman to clear your cache, you could be out of luck.

Yes, you can just download the latest Firefox when you want to install it again. However, there is no guarantee the newest version will work well on your system, so if you clear your entire package cache, downgrading to a previous Firefox version will not be possible without using an online package archive.

It should also be noted that you can clear your entire cache directory with the pacman -Scc command. This would force you to reinstall any packages from a fresh Internet download, so be careful when taking this route. Generally, it isn’t necessary to clear your whole cache unless you need the disk space.

Conclusion

Arch gives you a lot of freedom to shape your system as you see fit. Pacman makes it easy to install and remove packages, but it also requires some manual intervention at regular intervals.

Arch Linux Install Deb File

Take a quick look at your own package cache. If it’s getting a bit full, make it a point today to clear away some of the excess.

Ebooks

So you’ve made the switch to Linux. Or you’re thinking of making the switch. But you have questions that might be stopping you from fully diving in. One of the biggest concerns most new users have is, “What software is available and how do I install it?”

It’s a reasonable question. Why? For the longest time, Linux suffered from a stigma that applications were scarce, and that the few available options were a challenge to install. I remember, back in the early days, having to compile software from source packages—which would lead to a seemingly endless circle of missing dependencies. It was frustrating, but doable. That frustration, however, turned a lot of people away from Linux.

Advertisement

How To Install Deb Package On Ubuntu

Fortunately, those days are long since past, and installing any of the available software titles (of which there are many) on Linux is no longer such a headache.

How to Get Started with the Linux Operating System

What operating system do you use? For some, that question may as well be posed in Latin or…

Read more Read

Advertisement

Before we get into the how-tos of actually installing software on Linux, there is one very important concept to understand:

Package managers

This is one of those topics that tends to confound most new Linux users. A package manager is a sub-system on Linux that, as the title says, manages the packages (software) on your computer. It’s a crucial component of Linux, in that it keeps track of everything installed; downloads packages; ensures all packages are installed in a common location; helps to upgrade packages; resolves dependencies; and keeps users from having to install from source code.

Advertisement

The biggest point of confusion is that there are numerous package managers available, but only one can be used on a distribution. In fact, distributions are differentiated, primarily, on which package manager they choose. For example: Debian and Ubuntu (and its derivatives) use apt; Red Hat Enterprise Linux, CentOS, and Fedora use yum; SUSE and openSUSE use zypper; and Arch Linux uses pacman. There are more package managers out there, but this is a good place to start.

Each package manager works with a different file type. For example, apt works with .deb files and yum and zypper work with .rpm files. The apt package manager cannot install .rpm files and neither yum or zypper can install .deb files. To make matters even more confusing, Ubuntu (and its derivatives) uses the dpkg command for installing local .deb files, and Red Hat (and its derivatives) use the rpm command to install local .rpm files.

Advertisement

Install a Windowed GNU/Linux Environment On Any Android Device With This Guide

Android’s designed largely for mobile users, but since it has Linux at its core, it can work with a …

Read more Read

Confused yet? Don’t worry, it’s actually much easier than that.

Most package managers have GUI front ends. These front ends are similar to the Apple App Store. It should be no surprise that there are numerous such GUI front ends available. The good news here is that most of them are similarly titled (such as GNOME Software, Ubuntu Software, Elementary AppCenter). These app stores allow you to easily search for a software title and install it with the click of a button (more on this in a bit).

Advertisement

There is one other issue with package managers: repositories. Repositories are a key aspect of package managers, but for new users the concept can add yet another level of confusion we don’t want. For a quick overview, however, consider this: Out of the box you only have a certain selection of software titles available. That selection is dictated by the repositories that are configured. There are numerous third-party repositories you can add to the system. Once added, you can then install any software titles associated with those third-party repositories. Software repositories can be added either from a GUI tool or the command line.

In any case, repositories are an issue for a different day, and not necessary to understand for the type of software downloads discussed in this article.

Advertisement

Installing a downloaded file

I know, I know… I said one of the benefits of modern Linux operating systems is that you don’t need to install from a downloaded file. That being said, I want to start here. Why? There may be times when you find a piece of software not available in your distribution’s “app store.” When that occurs, you’ll need to know how to install that application manually. I will say that, for everyday, average use, it’s a rare occasion that you’ll need to do this. And even if you never do install using this method, at least you’ll have a very basic understanding of how it works.

Advertisement

Here, we’ll demonstrate using the latest release of Ubuntu Linux (as of this writing, 17.10). Most package managers install in similar fashion (with slight variations on the commands used). Let’s say you want to install the Google Chrome browser on Ubuntu. You won’t find this particular browser in the Ubuntu Software tool. To install it from the command line, you must download the correct file. As stated earlier, the correct file for Ubuntu will be a .deb file. So point your browser to the Chrome download page and click the Download Chrome button. The good news here is that your browser will be detected and the Chrome download page will know which file you need. Click the ACCEPT AND INSTALL button and a new window will appear, giving you two options (see below).

How to install deb package on ubuntu

Install Deb Package On Linux Mint

Advertisement

You can either save the file to your hard drive (and then install via the command line), or open the file with the Software Installer. It is important to understand that not every distribution includes the latter. If you do not get the Open with option, then you’ll have to install from the command line.

Let’s first use the Open with option. Make sure Software Install (default) is selected and click OK. The file will download and then Ubuntu Software will open, giving you the option to install (see below).

Advertisement

Click Install and you will be prompted for your user password. The installation will complete and Chrome is ready to use. You can close the Ubuntu Software tool and open Chrome from the Dash.

Advertisement

But what if you don’t get the option to install with the GUI tool? Then you have to select the Save File and run the installation from the command line. Don’t worry, it’s not that hard. Here are the steps to install the latest release of Chrome, on Ubuntu Linux, from the command line:

  1. Click on the square of dots at the bottom of the desktop
  2. When the Dash opens, type terminal
  3. Change into the Downloads directory with the command cd ~/Downloads
  4. Install Chrome with the command sudo dpkg -i google-chrome*.deb
  5. When prompted (see below), type your user password and hit Enter on your keyboard
  6. Allow the installation to complete

Advertisement

Install Package On Linux

Installing from the GUI

This is where things get very easy. To install from your distribution’s GUI, you only need open up the tool, search for the software you want, and click Install. Say, for instance, you want to install the GIMP Image editor. To do that, open Ubuntu Software and type gimp in the search bar. When the results appear, click on the GIMP entry, click the Install button (see below), and (when prompted) type your user password. Wait for the installation to complete and your new software is ready to be opened and used.

Advertisement

Bottom line: it’s all easier than it seems

Installing software on Linux isn’t nearly as hard as you might have thought. Yes, there may be the rare occasion when you need to install something from the command line, but even that isn’t much of a challenge. Besides, chances are, you’ll never have to install software outside of the GUI front end.

Arch Install Deb Packages

Advertisement

Arch Linux Installing Packages

Do remember, if you use a distribution other than Ubuntu (or its derivatives), you’ll want to do a quick bit of googling to make sure you understand the differences between the apt package manager and the one used on your desktop.