Reputation: 1
I am using Linux MX 19 based on Debian 10 When I make an update by terminal sudo apt-get update I see this problem All packages are up to date. N: Ignoring file 'yarn.lis' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
how to fixed this error ?
Upvotes: 0
Views: 7888
Reputation: 1
The message you're seeing, "Ignoring file 'php.list$' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension," indicates that there's a file with an invalid extension in the /etc/apt/sources.list.d/ directory. This file is likely intended to be a repository list for the apt package manager, but its name isn't following the expected conventions, and thus, apt is ignoring it.
How to Fix This:
Identify the File: You need to locate the file and check its contents to ensure it is correctly named and formatted.
or
Rename or Remove the File: Correct the file name or remove it if it's not needed.
now Open a terminal and list the files in the /etc/apt/sources.list.d/ directory:
ls /etc/apt/sources.list.d/
cat /etc/apt/sources.list.d/php.list$
Use the rm command to delete the file with the invalid extension. Make sure to use quotes around the filename to handle the special character $ correctly:
sudo rm /etc/apt/sources.list.d/php.list$
Finally, update the package lists to ensure there are no remaining issues:
sudo apt update
sudo apt upgrade -y
Upvotes: 0
Reputation: 4708
The file extension .lis
is not supported in /etc/apt/sources.list.d
, rename the file to yarn.list
.
From man 5 sources.list
:
SOURCES.LIST.D
The /etc/apt/sources.list.d directory provides a way to add sources.list entries in separate files. Two different file formats are allowed as described in the next two sections. Filenames need to have either the extension .list or .sources depending on the contained format. The filenames may only contain letters (a-z and A-Z), digits (0-9), underscore (_), hyphen (-) and period (.) characters. Otherwise APT will print a notice that it has ignored a file, unless that file matches a pattern in the Dir::Ignore-Files-Silently configuration list - in which case it will be silently ignored.
(emphasis mine)
Related:
Upvotes: 1