APT packages not found error

Hi I an a linux noob and have been scratching my head on this issue. My current version of dietpi is v8.21.1 and want to upgrade it to v8.25.1. But everytime I tried to update I get the following error.

Err:4 http://ppa.launchpad.net/mc3man/xerus-media/ubuntu mantic Release
  404  Not Found [IP: 80]
Err:7 http://ppa.launchpad.net/ondrej/php/ubuntu mantic Release
  404  Not Found [IP: 80]

Any help will hugely appreciated

It seems that an apt repository is not found.
You could look at next for entries in /etc/apt/sources.list or in files of the directory /etc/apt/sources.list.d/

Try to find out how this repo was initiated on your system and whether you can easily ignore/delete it.
This would be an easy solution.

Sometimes the repository servers are unavailable, then you should try the update later (hours, days).

I assume no problem of the DietPi stuff.


Well you added an Ubuntu repository manual l guess. However we are using Debian. Means this is completely wrong and source configuration to be corrected. Looking to the repository name, it seems you tried to add additional PHP repository.


hi stephenStS,

Looked at
etc-apt-sources.list.txt (302 Bytes)
and this is what I found. I did not anything manually here. All seem to be debian package.

This is the full error output.

full error output.txt (3.6 KB)

Seems that Joulinar is right with his assumption.
Could you look in the sources.list.d directory?

To check source files

for i in /etc/apt/sources.list{,.d/*.list}; do echo "$i:"; cat "$i"; done

ok the directory is full of repo I did not add. I wonder when I removed installed application it did not completely purge leftover directories etc?

I take it I just remove these problematic directories from the error output?

Not the entire directory, but only all Ubuntu files. At least from our side there is nothing that adds Ubuntu source files. Have you installed any software manually? With the help of instructions from the internet?

yes - i was trying to resolve the php version on nextcloud. Eventually gave up.

How would I remove the ubuntu files? go into each ubuntu directories on the list and delete the files or is there an easier way of doing this?

You would need to upgrade to Debian Bookworm to get regular PHP8 support.

rm /etc/apt/sources.list.d/*ubuntu*

thank you so much!!! I have managed to upgrade to the latest version of dietpi

keep in mind. DietPi version has no relation to Debian version. Actually, you are using Debian Bullseye offering PHP 7.4. You will need to upgrade to Debian Bookworm if you like to have PHP8 support. Debian Bookworm has been released – DietPi Blog


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.