Solve Kali Error “InRelease is not valid yet (invalid for another Xh Xmin Xs)”

If you are on Debian, Ubuntu, or Kali Linux and after installing or restoring the system you start getting an error given below, while running system update command, then here is the solution.

Release file for http://http.kali.org/kali/dists/kali-rolling/InRelease is not valid yet (invalid for another 13h 23min 36s). Updates for this repository will not be applied.

This error appears because of your system date and time settings. If the system currently doesn’t match the current time of the world, this error would come.

Run the command to check the current time and date value of the system:

sudo timedatectl status

Kali Time sync repository error

As you can see in the above screenshot, I am getting the error mention above while updating the system. The Kali system showing the date 17 June, however, in actual while this error was coming, the current date was 18 June.

So, what we have to do is the syncing of the Kali Linux time to the NTP server. May this would resolve the issue.

First, just restart the NTP service:

sudo systemctl restart ntp.service

 

Run the ntpq -p to check the listed NTP server in the ntp.conf file.

sudo ntpq -p

If everything is working fine, out of the listed NTP servers you will get the response. Then the problem is already solved, however, in case the NTP servers listed in the configuration file are not responding then add some manually.

NTP server response

 

Edit NTP.conf file

sudo nano etc/ntp.conf

Scroll down to the pool of existing NTP server and add the following one or any other you want:

server 0.ubuntu.pool.ntp.org
server 1.ubuntu.pool.ntp.org
server 2.ubuntu.pool.ntp.org
server 3.ubuntu.pool.ntp.org

To save the file press CTRL+X and then Y.

Add NTP server to KALI LINUX-min

Now, again run:

ntpq -p

This time you definitely get a response from Network Time Protocol servers.

Finally, run update command:

sudo apt update

Kali Time and date syncing

 

13 thoughts on “Solve Kali Error “InRelease is not valid yet (invalid for another Xh Xmin Xs)””

  1. Thank you, the truth is, I don’t know how there are people who come up with those solutions, so I knew there was something wrong with the date and time, but I never thought of changing the ntp.conf configuration and passing the POOL hosts to it.

    You helped me a lot, thank you.

    Reply
  2. why restarting the ntp.service? he just should be update the timezone and everything will be fine lol
    you can use: sudo ntpd -qg
    or you need to set: sudo ntpdate -v pool.ntp.org
    btw you dont have to change your source as long as you keep following the fresh updates!

    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.