Could not refresh list of updates - date not known in source list? [SOLVED]

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Beeedant

Could not refresh list of updates - date not known in source list? [SOLVED]

Post by Beeedant »

I'm a middle aged noob when it comes to anything beyond following the most basic instructions when anything goes wrong with the computer - so please be gentle with me, I'd really appreciate it though if anybody could please talk me through how to get the updates manager working again.

I've got a red x in the update manager icon... oh, on 18.3 - i tried the sudo apt-get update command, only to get this:
E: Type ‘sudo’ is not known on line 1 in source list /etc/apt/sources.list
E: Type ‘--2018-10-17’ is not known on line 1 in source list /etc/apt/sources.list.d/playonlinux.list
E: The list of sources could not be read.

My limited ability to decipher what I've googled hasn't come up with anything completely relevant. The date would be when a friend's teenage son was messing with the computer so he could game on it. He said he'd put it all back exactly as it was, but that doesn't seem to have been the case.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
WharfRat

Re: Could not refresh list of updates - date not known in source list?

Post by WharfRat »

Hello Beeedant Image

Welcome to Linux Mint and the Linux Mint forum :)

It looks like someone has been manipulating software sources :wink:

Paste pack the results of inxi -r
User avatar
xenopeek
Level 25
Level 25
Posts: 29615
Joined: Wed Jul 06, 2011 3:58 am

Re: Could not refresh list of updates - date not known in source list?

Post by xenopeek »

Indeed. There are two options:

1- You can go into Software Sources program (if it will open without error) and click the button there to reset configuration to default.

2- We can fix it manually. Probably the files /etc/apt/sources.list and /etc/apt/sources.list.d/playonlinux.list should just be deleted. Please share the contents of the file /etc/apt/sources.list before you do that though. You can use the command inxi -r to list all these files and can then share the output from the terminal here.
Image
Beeedant

Re: Could not refresh list of updates - date not known in source list?

Post by Beeedant »

Code: Select all

Repos:     Active apt sources in file: /etc/apt/sources.list
           sudo tee -a /etc/apt/sources.list
           sudo nano /etc/apt/sources.list
           sudo apt-get update
           Active apt sources in file: /etc/apt/sources.list.d/official-package-repositories.list
           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
           Active apt sources in file: /etc/apt/sources.list.d/official-source-repositories.list
           deb-src http://packages.linuxmint.com sylvia main upstream import backport
           deb-src http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
           deb-src http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
           deb-src http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
           deb-src http://security.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
           deb-src http://archive.canonical.com/ubuntu/ xenial partner
           Active apt sources in file: /etc/apt/sources.list.d/playonlinux.list
           --2018-10-17 09:32:02-- http://deb.playonlinux.com/playonlinux_trusty.list
           Resolving deb.playonlinux.com (deb.playonlinux.com)... 51.254.83.230, 2001:41d0:2:37ca::1e
           Connecting to deb.playonlinux.com (deb.playonlinux.com)|51.254.83.230|:80... connected.
           HTTP request sent, awaiting response... 200 OK
           Length: 44
           Saving to: ‘playonlinux_trusty.list’
           0K 100% 5.30M=0s
           2018-10-17 09:32:02 (5.30 MB/s) - ‘playonlinux_trusty.list’ saved [44
Beeedant

Re: Could not refresh list of updates - date not known in source list?

Post by Beeedant »

thank you for replying so quickly.... hope that's right
User avatar
karlchen
Level 23
Level 23
Posts: 18228
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Could not refresh list of updates - date not known in source list?

Post by karlchen »

Hello, Beeedant.

The mentioned 2 files, /etc/apt/sources.list and /etc/apt/sources.list.d/playonlinux.list, hold content, which should not be present in software sources list files.

In order to find out what the offending content is, open a terminal window.
Execute the comand: cat /etc/apt/sources.list Mark the text output which the command will display and paste it into your next reply.
Execute the comand: cat /etc/apt/sources.list.d/playonlinux.list Mark the text output which the command will display and paste it into your next reply.

In case the result should be that both files hold only invalid content, then both files should be removed. But we cannot be sure without knowing their content.

Best regards,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
Beeedant

Re: Could not refresh list of updates - date not known in source list?

Post by Beeedant »

i did try restoring default settings through the software sources, but i had the same error message as my first post pretty much!
Beeedant

Re: Could not refresh list of updates - date not known in source list?

Post by Beeedant »

cat /etc/apt/sources.list
sudo tee -a /etc/apt/sources.list
sudo nano /etc/apt/sources.list
sudo apt-get update
Beeedant

Re: Could not refresh list of updates - date not known in source list?

Post by Beeedant »

cat /etc/apt/sources.list.d/playonlinux.list
--2018-10-17 09:32:02-- http://deb.playonlinux.com/playonlinux_trusty.list
Resolving deb.playonlinux.com (deb.playonlinux.com)... 51.254.83.230, 2001:41d0:2:37ca::1e
Connecting to deb.playonlinux.com (deb.playonlinux.com)|51.254.83.230|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 44
Saving to: ‘playonlinux_trusty.list’

0K 100% 5.30M=0s

2018-10-17 09:32:02 (5.30 MB/s) - ‘playonlinux_trusty.list’ saved [44/44]
User avatar
xenopeek
Level 25
Level 25
Posts: 29615
Joined: Wed Jul 06, 2011 3:58 am

Re: Could not refresh list of updates - date not known in source list?

Post by xenopeek »

You can delete these two files; they have nothing in them except erroneous content.

In one go with this command:
sudo rm -v /etc/apt/sources.list /etc/apt/sources.list.d/playonlinux.list
Image
Beeedant

Re: Could not refresh list of updates - date not known in source list?

Post by Beeedant »

oh wow! that's just magicked everything better thank you SO much!
WharfRat

Re: Could not refresh list of updates - date not known in source list? [SOLVED]

Post by WharfRat »

I can see you were the one manipulating sources from this result :D

Code: Select all

cat /etc/apt/sources.list
sudo tee -a /etc/apt/sources.list
sudo nano /etc/apt/sources.list
sudo apt-get update
Easy fix - enjoy Mint :wink:
Beeedant

Re: Could not refresh list of updates - date not known in source list? [SOLVED]

Post by Beeedant »

I guess that's a couple of the commands i copy/pasted from forums from threads with similar issues but to no avail before conceding I needed to ask for help! Thank you again though. I'm really out of my depth with anything terminal related.
Locked

Return to “Beginner Questions”