Local Repo for Ubuntu

Ozan Ağma
1 min readSep 30, 2019

--

  • First you should change mirror.list file. It is in /etc/apt/
  • You can chose to path of your local repo path. In our example it is /media/repo/apt-mirror.
  • You can choose which repo to download with changing mirror.list file. In our example main restricted and universe repos are selected.
  • You can specify architecture. For our case amd64 and i386 are selected.
  • After mirror list file ready, execute sudo apt-mirror mirror.list
  • When download is finished, change sources.list based on below.
  • Ready.

mirror.list

set base_path /media/repo/apt-mirror

deb-amd64 http://tr.archive.ubuntu.com/ubuntu bionic main restricted universe
deb-i386 http://tr.archive.ubuntu.com/ubuntu bionic main restricted universe

clean http://tr.archive.ubuntu.com/ubuntu

sources.list

deb file:///media/repo/apt-mirror/mirror/tr.archive.ubuntu.com/ubuntu bionic main restricted universe

--

--