How to fix error while updating repositories in Ubuntu or Linux Mint

On entering the apt-get update command, the following errors appeared.

Reading package lists… Done
W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/InRelease Cannot initiate the connection to dl.google.com:80 (2414:6221:4109:825::210a). – connect (101: Network is unreachable) Could not connect to dl.google.com:80 (2xx.5x.2xx.2xx), connection timed out
W: Some index files failed to download. They have been ignored, or old ones used instead.

To overcome the above error, open a terminal window and enter the following:
$ sudo rm -rf /var/lib/apt/lists/* <enter>

Then do the update again.
$ sudo apt-get update <enter>