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 Cannot initiate the connection to (2414:6221:4109:825::210a). – connect (101: Network is unreachable) Could not connect to (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>