9

I run "sudo apt -y update" on my Ubuntu 16.04 server, but I got the following error:

# apt -y update                    
Reading package lists... Done                                                                                                       
E: The repository 'http://us.archive.ubuntu.com/ubuntu saucy Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://us.archive.ubuntu.com/ubuntu saucy-updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
root@yuyue-HP-Pro-3380-MT:/var/lib/apt# apt -y update
Get:1 http://cn.archive.ubuntu.com/ubuntu xenial InRelease [132 B]
Err:1 http://cn.archive.ubuntu.com/ubuntu xenial InRelease                                                                          
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Get:2 http://cn.archive.ubuntu.com/ubuntu xenial-updates InRelease [132 B]                                                          
Err:2 http://cn.archive.ubuntu.com/ubuntu xenial-updates InRelease                                                                  
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Get:3 http://cn.archive.ubuntu.com/ubuntu xenial-backports InRelease [132 B]                                                        
Err:3 http://cn.archive.ubuntu.com/ubuntu xenial-backports InRelease                                                                
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Ign:4 http://us.archive.ubuntu.com/ubuntu saucy InRelease                                                                           
Hit:5 http://security.ubuntu.com/ubuntu xenial-security InRelease
Ign:6 http://us.archive.ubuntu.com/ubuntu saucy-updates InRelease
Err:7 http://us.archive.ubuntu.com/ubuntu saucy Release
  404  Not Found [IP: 2001:67c:1562::16 80]
Err:8 http://us.archive.ubuntu.com/ubuntu saucy-updates Release
  404  Not Found [IP: 2001:67c:1562::16 80]
Reading package lists... Done
E: The repository 'http://us.archive.ubuntu.com/ubuntu saucy Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://us.archive.ubuntu.com/ubuntu saucy-updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

What could the reason be? How can I fix this problem? Thank you!

XavierStuvw
  • 1,391
  • 3
  • 14
  • 44
mlpy
  • 373
  • 2
  • 3
  • 8
  • Why do you have 13.10 (saucy) sources and 16.04 (xenial) sources, both enabled? – dobey Nov 06 '17 at 13:51
  • Where did you get the 13.10? – mlpy Nov 06 '17 at 13:53
  • I installed the official Ubuntu 16.04 installer on my machine. – mlpy Nov 06 '17 at 13:53
  • `# uname -a` Output: `Linux yuyue-HP-Pro-3380-MT 4.10.0-28-generic #32~16.04.2-Ubuntu SMP Thu Jul 20 10:19:48 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux` – mlpy Nov 06 '17 at 13:54
  • Oh I tried another answer which doesn't help, maybe it's the cause of 13.10. – mlpy Nov 06 '17 at 13:56
  • Ubuntu 13.10 (Saucy Salamander).has passed the dealine for community support. FYI. – K7AAY Mar 10 '20 at 20:33
  • 1
    Does this answer your question? [What can I do if a repository/PPA does not have a Release file?](https://askubuntu.com/questions/866901/what-can-i-do-if-a-repository-ppa-does-not-have-a-release-file) and [How do I restore the default repositories?](https://askubuntu.com/q/124017) – Kulfy Nov 22 '20 at 14:27
  • 1
    Does this answer your question? [How do I restore the default repositories?](https://askubuntu.com/questions/124017/how-do-i-restore-the-default-repositories) – BeastOfCaerbannog Nov 22 '20 at 17:32

3 Answers3

15

This happens because you still have somehow the sources.list file for Ubuntu 13.10 on your machine:

You can use sudo -i in terminal and copy & paste the following (complete block) into it:

cat > /etc/apt/sources.list << EOF
deb http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
#deb http://archive.ubuntu.com/ubuntu xenial-proposed restricted main universe multiverse
#deb-src http://archive.ubuntu.com/ubuntu xenial-proposed restricted main universe multiverse
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
EOF

This will overwrite your /etc/apt/sources.list file. After that you should use exit to get out of root.

If you not wish all package sources to be enabled you can change this from the GUI applet called 'Software&Updates' which you find within your settings.

Then you should do the obligatory:

sudo apt clean
sudo apt update
sudo apt dist-upgrade
Videonauth
  • 33,045
  • 16
  • 104
  • 120
  • It might be better to use `sudo sed -i.bak s/saucy/xenial/g /etc/apt/sources.list` to make sure all the extra repositories stay turned on or turned off. For example, there's no way of knowing whether they have `restricted` turned on or not and you have it turned off. – Chai T. Rex Nov 06 '17 at 13:54
  • @ChaiT.Rex yes but would not solve the problem then. They would face the then occurring double entry bug. If not wanted they still can turn the repositories off in software & updates later. There are both sources in this list. – Videonauth Nov 06 '17 at 14:28
  • Thank you for your solution. It worked for me. – Mostafa Talebi Feb 04 '18 at 20:55
  • Worked for me too! for Ubuntu 16.04. – Abel Tom Jun 11 '19 at 14:08
3

Hope, I'm not late to the party

For anyone that might still face the same issue, the solution above did not work for me. In my case, the root directory partition was full (100% used up), I used

df -h
cd /
du -sch * --exclude=home

to check what was using up the disk space. In my case, there was a backup of mysql data folder in the root directory taking up about 3.7GB out of the 9.1GB space. All I did was to deleted the mysql folder. But be careful of what you delete.

OPMat
  • 131
  • 3
1

Get sources.list from Ubuntu Sources List Generator and replace your /etc/apt/sources.list with the downloaded file. Next run

sudo apt update
sudo apt dist-upgrade
Kulfy
  • 17,416
  • 26
  • 64
  • 103
  • That site does not seem to be working properly. – Sam Sirry Jan 29 '22 at 01:12
  • 1
    Sorry, but this is poor advice IMO! The site could easily cease to exist and is also dubious in terms of functionality + user security. If you provided a realistic base source list and also provided a general way of inspecting possible (and verified) sources this would be a great answer and it seems like you're new here so that's rocking! – gdgr Jul 13 '22 at 03:42
  • Apparently the site did cease to exist :-) – Ron Smith May 31 '23 at 14:51