-5

Every time I run apt update, I get this error in Kali Linux 2025.2.

└─# apt update
Error: Conflicting values set for option Signed-By regarding source http://http.kali.org/kali/ kali-rolling: /usr/share/keyrings/kali-archive-keyring.gpg != /etc/apt/keyrings/kali-archive-keyring.gpg
Error: The list of sources could not be read.

I've tried these two methods below that don't seem to work. I still keep getting the error message. Yes, I already updated to the new keys that didn't work also.

Method 1

sudo wget https://archive.kali.org/archive-keyring.gpg -O /usr/share/keyrings/kali-archive-keyring.gpg
sudo wget https://archive.kali.org/archive-keyring.gpg -O /etc/apt/keyrings/kali-archive-keyring.gpg
sudo apt update

Method 2

sudo rm /usr/share/keyrings/kali-archive-keyring.gpg
sudo rm /etc/apt/keyrings/kali-archive-keyring.gpg
sudo wget https://archive.kali.org/archive-keyring.gpg -O /usr/share/keyrings/kali-archive-keyring.gpg
sudo apt update

These commands should have fixed the problem, but the error continues to persist after running them.

# cat /etc/apt/sources.list.d/kali.sources 
# Modernized from /etc/apt/sources.list
Types: deb
URIs: http://http.kali.org/kali/
Suites: kali-rolling
Components: main  contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/kali-archive-keyring.gpg

Types: deb
URIs: http://http.kali.org/kali/
Suites: kali-rolling
Components: main  non-free contrib
Signed-By: /etc/apt/keyrings/kali-archive-keyring.gpg
5
  • 4
    It sounds like a duplicated entry in /etc/apt/sources.list or one of the files under /etc/apt/sources.list.d. Maybe try to find the duplicate? askubuntu.com/questions/1156409/… Commented Jun 10 at 19:34
  • Please add the contents of your files /etc/apt/sources.list and /etc/apt/sources.list.d/*.list to your question. There will be at least two entries for http.kali.org/kali/ kali-rolling but with different signers as described in the error message Commented Jun 10 at 20:17
  • None of those commands even remotely address the problem. Like @ChrisDavies says, the problem is somewhere in your sources files. Add those to your question rather than paste them in a comment because that's unreadable. Commented Jun 11 at 4:24
  • "Could this be causing the error" - I've no idea as it's unreadable. Comments can and do get deleted so don't use them for additions to your question. Instead, please edit your question and put your updates there. Take time to keep the question readable (you don't need "edit" or "update"; just include the new information where it makes sense). Commented Jun 11 at 6:52
  • I had this issue once because an update of a package, megasync, automatically added a .list file when I had a deb822 file. Commented Jun 19 at 14:16

2 Answers 2

1

Take a look at the sources.list files in your question. You have a duplicated entry but with different signers. Identify the correct one and remove or comment out the other

0

In your /etc/apt/sources.list.d/kali.sources file, remove the part which says:

Types: deb
URIs: http://http.kali.org/kali/
Suites: kali-rolling
Components: main  non-free contrib
Signed-By: /etc/apt/keyrings/kali-archive-keyring.gpg

The first part should already be the text after using apt modernize-sources, so there is no need for the redundant second part which causes an error. Also, /etc/apt/keyrings is not the typical place for distribution keyrings, /usr/share/keyrings is the proper place for them. You should still check for if the keyring exists to replace the Signed-By field if needed.

The kali.sources file should now be:

# Modernized from /etc/apt/sources.list
Types: deb
URIs: http://http.kali.org/kali/
Suites: kali-rolling
Components: main  contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/kali-archive-keyring.gpg

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.