N: Ignoring file 'ubuntu.sources.md' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension

i everyone , im new user to linux and i have some problem with sudo apt update that appears to give me hundered of error but the first one is this an i try to remove or rename it as root but it keep saying that i dont have a permision or the file dosent exist

sudo rm /etc/apt/sources.list.d/.disable
rm: cannot remove '/etc/apt/sources.list.d/
.disable': No such file or directory

sudo rm /etc/apt/sources.list.d
rm: cannot remove '/etc/apt/sources.list.d': Is a directory

`

1 Like

Welcome @ali_ataei to the community!

1 Like

Dir /etc/apt/sources.list.d/ is not empty so you cannot remove it.
I checked my um24.04, the file is ubuntu.sources (there is no .md).

cd /etc/apt/sources.list.d/
sudo mv ubuntu.sources.md ubuntu.sources
sudo apt update (should be clean)

Since you're a beginner on Linux, do NOT remove /etc/apt/sources.list.d/

2 Likes