Apt-mirror
sudo apt install apt-mirror
Create a Source list
sudo su
#Remove wrong ones from the configure file
sed -i '17,27d' /etc/apt/mirror.list
#Insert correct ones
echo "
deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ jammy partner
" >> /etc/apt/mirror.list
Start Mirroring
apt-mirror
Location of packages:
/var/spool/apt-mirror/mirror/archive.ubuntu.com/ubuntu
Add to apt sources list
sudo su
echo "deb file:/var/spool/apt-mirror/mirror/archive.ubuntu.com/ubuntu jammy main restricted universe multiverse" >> /etc/apt/sources.list
sudo apt-get update
Apt-get fails with failed to fetch Packages.xz Hash Sum mismatch
apt-get hash sum mismatch
Can't install software using apt-get install : hash sum mismatch and failed to fetch errors
Trouble downloading packages list due to a "Hash sum mismatch" error
update-manager "failed to download package files" but apt upgrade works
File not found - /var/spool/apt-mirror/mirror/archive.ubuntu.com/ubuntu/dists/jammy/main/dep11/icons-64x64@2.tar (2: No such file or directory)
kubuntu 18.04 apt-get update fails with missing icon @2 files
Apt Mirror not mirroring bionic/main DEP-11 64x64@2 Icons
wget https://mirror.cs.jmu.edu/pub/ubuntu/dists/jammy-updates/universe/dep11/ -r -np