Score:0

A repo that is making it not possible to update with sudo apt update

pk flag

I have tried to get php 8.0 but it was a pain so I want it removed which I did. Now when I update I get this:

ubuntu@ubuntu:~$ sudo apt update
Hit:1 https://download.docker.com/linux/ubuntu focal InRelease
Ign:2 https://packages.sury.org/php focal InRelease                                                                                                           
Hit:3 http://ports.ubuntu.com/ubuntu-ports focal InRelease                                                                                                    
Err:4 https://packages.sury.org/php focal Release                                  
  404  Not Found [IP: 104.21.18.148 443]
Get:5 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease [114 kB]        
Hit:6 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease                              
Get:7 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease [101 kB]
Get:8 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease [114 kB]
Get:9 http://ports.ubuntu.com/ubuntu-ports focal-updates/restricted arm64 Packages [2992 B]
Get:10 http://ports.ubuntu.com/ubuntu-ports focal-updates/restricted Translation-en [57.0 kB]
Get:11 http://ports.ubuntu.com/ubuntu-ports focal-updates/multiverse arm64 Packages [7720 B]
Get:12 http://ports.ubuntu.com/ubuntu-ports focal-updates/multiverse Translation-en [6888 B]
Get:13 http://ports.ubuntu.com/ubuntu-ports focal-security/restricted arm64 Packages [2804 B]
Get:14 http://ports.ubuntu.com/ubuntu-ports focal-security/restricted Translation-en [47.8 kB]
Reading package lists... Done            
E: The repository 'https://packages.sury.org/php focal 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.

I have tried to read forums on how to delete repos but I didn't know the name of the repo. I can install and purge just fine but updating is the main problem.

mchid avatar
bo flag
Welcome to Askubuntu. Please edit your question and copy and paste the code and do not post a screenshot. Posting a screenshot is a good way to have your question ignored. Paste the output into the question, highlight the code and then press CTRL+K to automatically format it as code. Thanks.
bac0n avatar
cn flag
The [readme.txt](https://packages.sury.org/php/README.txt) suggest the file is named `/etc/apt/sources.list.d/php.list`
Human avatar
pk flag
@bac0n Thanks I found the package link thing in there like this `deb https://packages.sury.org/php/ focal main` which I believe is the repo link i'm looking for. Though would I remove php.list or just the repo?
Human avatar
pk flag
it works fine actually without the files I will write an answer and refer your comment thanks
bac0n avatar
cn flag
the dist is stretch buster or bullseye suggests it's suited for debian and not ubuntu. (yes you can delete it)
Human avatar
pk flag
that makes a lot of sense thanks
Score:2
cn flag

Edit the file /etc/apt/sources.list, for example, with nano editor:

sudo nano /etc/apt/sources.list

Then comment the lines with the "sury" repo, adding a # at the beginning of the line.

Then come back to the terminal, and repeat the sudo apt-get update command.

Human avatar
pk flag
I've looked for surry but I can't find it
Unix avatar
cn flag
Then, check if that repo is into the directory `/etc/apt/sources.list.d` (ending with a ".d"). What is the output of `ls` command into that directory?
Human avatar
pk flag
I checked that file like what @bac0n said and deleted the php file repo and it works superb
Unix avatar
cn flag
Yes, that's it! By the way, you can upvote my answer. Thanks!
Human avatar
pk flag
I don't have enough rep to upvote it sorry
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.