Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

It was always my impression that Ubuntu was a binary package distro and that developer sources for various packages were supplied in separate sources repos, if required.

It seems that my sources.list file is littered with source repos. Indeed, if adding a package repository via update manager preferences, it automatically includes the sources repo into my sources.list.

This is killing my update times and leads me to believe that my apt sources.list is very wrong indeed.

My question is:

  • are the source repositories required for anybody who just wants to run software and not compile it themselves?
share|improve this question
1  
I remove the source packages everytime since about two years and never experienced any problems or different behaviour. Therefore I'd say that for a normal user, it's safe to disable them. –  onse Jul 10 '12 at 12:14
1  
What source packages are you talking about? Source packages are never auto-installed. –  izx Jul 10 '12 at 12:57

7 Answers 7

up vote 7 down vote accepted

Note: Source repositories are different from source packages. The repositories, if selected or present in your software sources, are updated whenever you check for updates. Source packages, on the other hand, are never automatically installed -- regardless of whether you use apt-get install or the Software Center. You must explicitly install them with apt-get source, etc.

No, the source repositories are not required for a normal user; you also do not have to download or install any source packages for the proper functioning of your software.

To remove them, open Software Center, and go to the Edit menu...Software Properties.

  • Click on the box to the left of Source Code as shown below. If you are asked for your password enter it. The box should then be unchecked (white box). Click on close.

    enter image description here

share|improve this answer

They are not required for binary-only usage, no. They are required for certain features of apt-get to work, particularly the source and build-dep commands.

You can comment them out, or disable them in the software-properties-gtk application, which can be opened via update-manager or software-center.

share|improve this answer

There are 3 cases that are related to packages, 2 of which are related to the source packages.

Binary Only - This is where you installed a Deb package without the need for the source code. This is the typical one and normal users do not need to worry about the source code or working with it. Most packages that you find in the Software center for example are this type.

Binary + Source - There are some cases, where a Binary package might ask to compile something additional from the source as a step for a proper install. In most cases it will do it automatically but it will still need to download the source code to compile it and have a proper installation. Some proprietary drivers and some scanning tools are in this part.

Source - This is for developers, end users that want to compile their own packages or test out some changes in already existing code. Some cases, the source code is the only thing that comes for a particular package. About 50% of EVERYTHING is in here. Almost everything is in here... Almost (Proprietary drivers are not ^^).

So are source packages required: If you are the common normal user then you won´t need to worry about this packages. Even if you download something that needs to compile something additional to work correctly, you won´t need to worry. In almost all cases this is done automatically. You will in fact need the source if you:

  1. Want to contribute to the development of a particular program
  2. Want to learn the source Luke... Feel the source Luke!
  3. Want to test out your version of Empathy, or Nautilus or some Unity or any other package you want to get your dirty hands on.
  4. Want to create your own awesome version of Ubuntu (Awebuntu!)
share|improve this answer

The source packages are not required.

However they are available for those who want to study/alter the source code of a specific application.

From Chapter 6 of Debian APT Howto:

It's common in the world of free software to study source code or even make corrections to buggy code. To do this, you would need to download the source of the program. The APT system provides an easy way to obtain source code to the many programs contained in the distribution, including all the files needed to create a .deb for the program.

Another common use of Debian sources is to adapt a more recent version of a program, from the unstable distribution, for example, for use with the stable distribution. Compiling a package against stable will generate .debs with dependencies adjusted to match the packages available in this distribution.

[Full Chapter]

share|improve this answer

Part of the GNU public license (GPL) and other open source licenses is that you have access to the source code. For example the copyleft statements in the GPLv3 document, especially the preamble: http://www.gnu.org/copyleft/gpl.html

Strictly speaking though, you do not need the source code and you should turn source code off in software sources if you want to.

Open Software center then click "edit" in the universal menu, click "software sources", then untick "source code".

share|improve this answer

No, a standard user does not needs those packages.

Also these kind of packages are for a really targeted family of developers, more often a developer just need headers to compile and develop for a generic linux platform, or just for the kernel.

Sometimes sources are also needed not to really compile them but to study them in order to provide a better support for the developer or a particular feature, for example Eclipse parses the sources of your jdk in order to provide a complete set of methods and classes in its auto generated documentation and it also uses this informations to provide an auto-completion feature.

share|improve this answer

In addition to the great answers already given, be aware that when you add a repository, it automatically adds the source code repository. You can delete it.

These are also in the Software Sources application, but in the Other Software tab. Find those items that read "(Source Code)" and either disable (uncheck) or remove them.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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