I don't know about tar balls. Most packages are available in the tar ball forms but Ubuntu packages are Debian packages.

What is the difference between deb packages and tar balls ?

What are the advantages/disadvantages of each ?

4 Answers 4


Tar balls are usually source code that you have to compile. Debs are pre-compiled programs, already built and configured for Ubuntu/Debian.

I would strongly suggest using debs when available, as they are easier, and they integrate with the package manager, so you can easily uninstall them.

Debs will also install any dependencies needed. Installing from source can lead to what is affectionately called "dependency hell". Most open-source programs depend on several other programs/libraries to function. When installing from source, it will not install these, and will instead (hopefully) complain that a dependency is not met. You then try to install that dependency and then it bombs out, requiring another dependency, etc, etc.

Installing from source can also put your files in unexpected places, as different distros lay things out slightly different.

When I need to install a program, I try my options in this order:

  1. Look in the Software Center. This is obviously the easiest, although the Software Center is not all-inclusive and is not up-to-date with the latest versions.

  2. Try to find a repository that provides it. Adding a repository will make the program show up in the Software Center, receive timely upgrades, etc.

  3. Look for a .deb package.

  4. Install from source (tar ball).


tar balls are just another form of compression like zip. Although the formats and techniques of compression differ, it is basically a container for a group of files and folders.

Usually, the source code and the files needed by it will be made available on the internet by the person/group who wrote the software in the form of a tar ball. So you can download it, untar it, compile the software and install it.

However, what deb packages do is to make this installation process easy for you by maintaining a standard. The software available on the internet will be taken by Debian package maintainers, made into their corresponding .deb packages and put into the Debian repository.

enter image description here

You can read about it from a Debian Package maintainer's blog here : http://www.j4v4m4n.in/2012/05/01/debian-utsavam-at-mes-kuttippuram-kerala-2/

As for the advantages and disadvantages, .deb packages are managed by package managers such as apt and aptitude. So whenever you install a software with it, they will automatically figure out if you have the dependencies that are required to run that software on your system and will install them for you.

But if you are using a tar ball install it, you will have to figure out what that software depends on and each time you will have to check manually whether the dependencies of the software you are installing were already installed previously.

But apt does all this for you.

Also, installing from source (installing from tar balls) will have different methods for different software. There is the GNU philosophy of configure-make-make install and there are other methods depending on how the software is written.

However, converting them into deb completely removes all these differences and makes it easier for the user to install and use the software.

One more point. When do you need to install from source? That is from a tar ball? There are basically two situations.

  1. If the debian packaging team has not yet packaged a software.
  2. If you want to contribute to the project. That means you can make changes to the source code, compile it and test the changes.

If you would like to know more about debian packaging, you can read it from here : http://www.debian.org/doc/manuals/maint-guide/

Hope this helps.


Debian (and hence Ubuntu) packages are collection of binaries and related instructions for their installation. This means that the package itself knows how and where to install, and it also knows the list of packages it depends on.

Source tarballs (files with extension .tar.gz or .tar.bz2 - or even .tgz or .tbz2) are simply sets of files and directories that have been packed together with the tar utility and also compressed with either gzip or bzip2. To build the source code you have to:

  1. unpack the files with tar xvfz file.tar.gz or tar xvfj file.tar.bz2 (in an empty directory)
  2. configure the package with ./configure (the package tests the system to see if everything is ok before starting the compilation)
  3. start the compilation with make
  4. if you want to, run make install to install the application to its "default" locatioon (usually in /usr/{s}bin or /usr/local/{s}bin but it depends on the application and on the distribution)

The main advantages of Debian/Ubuntu packages with respect to source tarballs are that packages are "self-contained" and their binaries are tracked. This means that the unpacking process is transparent to the user who just sees (roughly) one package per application. The user doesn't even need to remember what files a given application has installed and where, so the installation/removal of applications becomes (mostly) a one instruction process.

The main advantages of source tarballs with respect to binary packages are that in the first case the source code is compiled directly on the target machine and can then be optimized accordingly. Moreover, even the best package system can broke in particular cases (e.g. software packages too new or too old) and usually official packages are purged by servers when they become too old. In these cases one has to manually search the Internet for the desired application and for the specific libraries at specific versions to satisfy all its dependencies.

  • 1
    A small point. The "configure, make, make install" steps are for those Softwares that use the GNU automake build philosophy. There are Softwares that can be built from source (from tar balls) in various ways. So it might not be correct saying "To build the source, do configure, make, make install". The best way to put it might be, "To install from source, read the README or INSTALL file within the source and follow the steps mentioned there within. Do refer to this : sosaysharis.wordpress.com/2011/11/28/… May 23, 2012 at 2:27
  • Yes, I just talked about this kind of method because it's adopted by the vast majority of source tarballs.
    – Avio
    May 23, 2012 at 19:59
  • No debate there. :) May 24, 2012 at 12:32

I can see some pretty good answers already posted. But there are a few things that need to be addressed.

Contrary to what is known as "dependency hell" when it comes to compiling from source, you can actually configure Ubuntu in such a way that it automatically installs those dependencies when you are compiling from a tarball/ any source.

Read how to do this here:


Also, if you keep that dependency problem aside, the good thing about tarballs is that you can configure lot of install related things like where to install etc, very easily in case of installing from source.

Also, the word "Debian Packages" could confuse you in this context. Remember that Debian packages come in two types like it says here:


Of course, if you are talking only about deb files, then they generally are those compiled software like the above answers already said.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.