====== Offline APT Repo ====== ===== downloading all the deb files ====== apt update # recursive apt dependencies apt install apt-rdepends # this downloads all deb packages of dnsmasq and dependencies. Filter out debconf-2.0 because dependency is missing apt download $(apt-rdepends dnsmasq|grep -v "^ "|grep --invert-match debconf-2.0) https://stackoverflow.com/a/27469489/9397749 ===== create Package information ===== apt install dpkg-dev dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz ===== package as iso (optional) ===== apt install genisoimage genisoimage -J -o apt-local.iso ./pkg ((https://unix.stackexchange.com/a/90794)) -J generates case sensitive filenames, which apt needs((https://superuser.com/a/616455 and https://unix.stackexchange.com/a/274751)) ===== read the info ===== rename ''debian.sources''. add this to sources.list deb [trusted=yes] file:/mnt/cdrom ./ https://askubuntu.com/a/458754/1977823 More from ubuntu documentation: https://help.ubuntu.com/community/Repositories/Personal