sources.list file empty?

Archived topics about LMDE 1 and LMDE 2
Locked
albaberto

sources.list file empty?

Post by albaberto »

Hi all,
here a newbie question from a newly converted Mint -> LMDE user:

After the install of LMDE I had a look at the etc/apt/sources.list file but I found it empty. I then realized that the repos are placed in a different folder as single files.
Can someone explain why (I couldn't find any answer on the forum yet)?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Fred Barclay
Level 12
Level 12
Posts: 4185
Joined: Sat Sep 13, 2014 11:12 am
Location: USA primarily

Re: sources.list file empty?

Post by Fred Barclay »

G'day albaberto,
Welcome to LMDE!

You're right, LMDE places the repo lists in the /etc/apt/sources.list.d directory, unlike Debian, which puts them in /etc/apt/sources.list. apt is able to find repos listed in both locations, though, so it's really a matter of personal preference.

I think the Mint devs do it this way so they can group repos together more easily. In particular, I remember that the mintSources tool expected the main Mint repos to be in /etc/apt/sources.list.d/official-package-repositories.list. That gives a nice, clean grouping of the Mint repos, all in a single file. If you were to add another repo later, you would either add another .list file in /etc/apt/sources.list.d, or edit /etc/apt/sources.list. Either way, the extra repo you add would be kept in a separate file from the Mint repos, making it easier (IMHO) to edit or remove it later.

Cheers!
Fred
Image
"Once you can accept the universe as matter expanding into nothing that is something, wearing stripes with plaid comes easy."
- Albert Einstein
albaberto

Re: sources.list file empty?

Post by albaberto »

Thanks Fred that's clear.
I was suspecting something similar. Essentially I can modify the /etc/apt/sources.list file considering it as a "personal" repo location without messing around with the sistem's repos located in the /etc/apt/sources.list.d directory.

See you soon!
User avatar
Fred Barclay
Level 12
Level 12
Posts: 4185
Joined: Sat Sep 13, 2014 11:12 am
Location: USA primarily

Re: sources.list file empty?

Post by Fred Barclay »

Yep, that's it! :) You can also add additional .list files in /etc/apt/sources.list.d/. For example, here's what mine looks like:

Code: Select all

$ ls /etc/apt/sources.list.d/
arc-theme.list  betsy.list  google-chrome.list  jessie-backports.list  qtox.list  spotify.list
$ inxi -r
Repos:     Active apt sources in file: /etc/apt/sources.list
           deb http://ftp.us.debian.org/debian/ jessie main contrib non-free
           deb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free
           deb http://security.debian.org/ jessie/updates main contrib non-free
           deb-src http://security.debian.org/ jessie/updates main contrib non-free
           deb http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free
           deb-src http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free
           Active apt sources in file: /etc/apt/sources.list.d/arc-theme.list
           deb http://download.opensuse.org/repositories/home:/Horst3180/Debian_8.0/ /
           Active apt sources in file: /etc/apt/sources.list.d/betsy.list
           deb http://packages.linuxmint.com betsy main upstream import
           deb-src http://packages.linuxmint.com betsy main upstream import
           Active apt sources in file: /etc/apt/sources.list.d/google-chrome.list
           deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
           Active apt sources in file: /etc/apt/sources.list.d/jessie-backports.list
           deb http://ftp.debian.org/debian jessie-backports main
           Active apt sources in file: /etc/apt/sources.list.d/qtox.list
           deb http://download.opensuse.org/repositories/home:/antonbatenev:/tox/Debian_8.0/ /
           Active apt sources in file: /etc/apt/sources.list.d/spotify.list
           deb http://repository.spotify.com stable non-free

(This is Debian Stable, not LMDE, but you get the idea.)
Image
"Once you can accept the universe as matter expanding into nothing that is something, wearing stripes with plaid comes easy."
- Albert Einstein
albaberto

Re: sources.list file empty?

Post by albaberto »

I found a confirmation of your response in "The Debian Administrator's Handbook" page 101:
TIP:
If many package sources are referenced, it can be useful to split them in multiple files. Each part is then stored in /etc/apt/sources.list.d/filename.list (see sidebar “Directories ending in .d” page 111).
The manual is free and very complete!
Locked

Return to “LMDE Archive”