1

I think these lines can trim to few lines. So I need some advice. How can I improve these sources.list?

apt/sources.list, Latest Debian release:

deb http://security.debian.org/ wheezy/updates main contrib
deb-src http://security.debian.org/ wheezy/updates main contrib
deb http://ftp.debian.org/ wheezy-updates main contrib
deb-src http://ftp.debian.org/ wheezy-updates main contrib
deb http://ftp.debian.org/debian/ wheezy main contrib non-free
deb-src http://ftp.debian.org/debian/ wheezy main contrib non-free
deb http://ftp.debian.org/debian sid main
2
  • "deb-src" means the sources of the software in the Debian repositories/archives. "deb" corresponds to the binaries. If you don't want the sources, you can remove the "deb-src" lines. The sid/unstable line also may not be useful for you. In general you cannot directly install binaries from unstable on wheezy. Commented Oct 17, 2014 at 11:58
  • 2
    What exactly do you mean by "improve"? Do you want to remove unnecessary repositories or do you want the exact same list of repositories written in a more condensed way? There are things you can remove here, but if you want the same repos, this is as good as it gets as @Braiam pointed out. Commented Oct 17, 2014 at 12:50

1 Answer 1

2

The structure of the sources.list doesn't benefit of "minimization". There's no actual gain on compressing the lines further. All repositories listed should have the following:

type [ options ] uri suite [component1] [component2] [...]

or the rfc822 format

Types: deb deb-src
URIs: http://example.com
Suites: stable testing
Sections: component1 component2
Description: short
 long long long
[option1]: [option1-value]

Your sources.list already benefits of the shortest valid method you can list sources. Of course, you can repeat the same line with different components, and treat them separatelly:

deb http://security.debian.org/ wheezy/updates main
deb http://security.debian.org/ wheezy/updates contrib

but for APT, that's equivalent to:

deb http://security.debian.org/ wheezy/updates main contrib

while being parsed.

How can I improve these sources.list?

There's no room for "improve". As long as the file is valid APT won't complain.

3
  • You might want to explain that the OP can safely remove the src lines since those are only useful to install sources. Also, could you comment on the presence of a sid repository while the rest are wheezy? That sounds like a recipe for disaster. Commented Oct 17, 2014 at 12:30
  • 1
    @terdon "I think these lines can trim to few lines." he doesn't want to remove repositories, he wants a smaller file with the same repositories. Commented Oct 17, 2014 at 12:41
  • Ah, maybe. I understood that the OP wants to remove anything that's not needed. I left a comment, let's see if they answer. Still, isn't combining sid with wheezy like that a bad idea? Commented Oct 17, 2014 at 12:51

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.