2

On a relatively freshly installed Linux Mint 18.3, I've discovered that there is no /etc/apt/sources.list file. This seems to cause no problems, but occasionally a warning pops up:

WARNING:root:could not open file '/etc/apt/sources.list'

(for example if I try to execute a command that does not exist in the command line).

AFAIU, on Linux Mint the standard sources are in /etc/apt/sources.list.d/official-package-repositories.list.

Will everything work as exepcted without sources.list? Is it normal to not have it? If not, any ideas how it could get removed? (The warning was accidentally noticed about a week or two after the system was installed.)

Is it better to ignore the warning or to create an empty /etc/apt/sources.list, or are there better solutions?

I understand that I can just create an empty file and the warning will probably go away, but I want to understand how this happened on a newly installed Linux Mint 18.3, and if it could be a symptom of some problem (maybe there are more important files missing somewhere).

  • google sources.list mint, 1st choice, a nice and long explanation. – Rui F Ribeiro Feb 25 '18 at 9:28
  • 2
    @RuiFRibeiro, that page does not even mention sources.list file or my warning, does not tell why it could be missing on a fresh system, or what the implications of its absence would be. It starts by explaining how to disable all software sources that you possibly have added yourself. – Alexey Feb 25 '18 at 9:41
  • Google google.com/…' – Knud Larsen Feb 25 '18 at 13:23
  • 2
    Please stop posting links to google, post links to answers or to other occurrences of the same question (which i did not find). – Alexey Feb 25 '18 at 13:25
  • What program is giving the warning? apt shouldn't complain about that, it's standard for apt & Debian – Xen2050 Mar 14 at 23:32
1

As mentioned by user Rui F Ribeiro, this is the first result on Google using the search operand sources.list mint:

https://sites.google.com/site/easylinuxtipsproject/reserve-8

This site has all of the information about what your Linux Mint 18.3 Sylvia install sources list should contain and how to reset it multiple ways. One way is to open a terminal and run:

gksudo xed /etc/apt/sources.list.d/official-package-repositories.list

Then verify that your file matches this identically

deb http://packages.linuxmint.com sylvia main upstream import backport

deb http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse  
deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ xenial partner

After that save and close the file, then run:

sudo apt-get update
sudo mintupdate-tool upgrade -r -l123 -s -nk

After this reboot. If you continue to have problems or are experiencing some other kind of issue then you will need to provide additional information concerning that.

  • This is not about my question, please read it again. – Alexey Feb 25 '18 at 21:27
  • @Alexey, Is your question is it okay if your Linux Mint install does not have a /etc/apt/sources.list and instead has the file /etc/apt/sources.list.d/official-package-repositories.list? As far as I can tell Linux Mint uses the later for its update process. If you read the link provided it explains the file that Linux Mint uses in its update process. If you are having issues updating follow the instructions to correct your Linux Mint repository sources file. If your issue is not concerning the repository source file and involves some other issue you will need to provide additional context. – kemotep Feb 25 '18 at 21:39
  • I do not have issues with updating. I did not find a clear statement that Linux Mint is not expected to have sources.list. I am not sure if is ok for a Debian based distribution to not have sources.list. If it is ok, i am wondering why i was getting the warning. – Alexey Feb 25 '18 at 21:44
  • 1
    It appears Linux Mint is supposed to be updated via the GUI application called ` Update Manager ` . The issue you are reporting is due to of Linux Mint wanting to have you use that tool to update instead of traditional command line tools. Just looking now there does not even appear to be an official wiki page let alone comprehensive documentation for Linux Mint. The link I provided is the only non-forum post I could find that mentioned the sources.list file. I suggest you use Ubuntu or Debian if you want a saner command-line management experience with actual documentation. – kemotep Feb 25 '18 at 21:59
  • 2

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.