I have a machine that does not have an internet connection and I need to download a few packages to it.
I can use apt-get download xxx
to get the package, but, if I ever connect this machine to the internet, will apt-get update / upgrade
know what this package is and update it successfully, or will it cause problems in the future?
All required info of a package are located in the package (like name and version). When you need to update, it is basically comparing the vesrion of the package you have installed and the version of the package in the repositories. So in short,
apt-get update
andapt-get upgrade
will upgrade the package as long as the package is in the repositories installed on the second machine.Assuming you use
apt-get download
to download the packages, copy them to the "isolated" machine and install withsudo dpkg -i *.deb
(or similar), then yes,apt-get
will know that these packages/versions have been installed and will upgrade them if necessary.It depends on the type of Package installation you do. If you install packages VIA officially provided
.deb package
then you don't have to worry .sudo apt-get update && sudo apt-get upgrade
will work flawlessly , even if you are doing an offline update and connect it to Internet sometime later , it will work.In cases where .deb files are not available you can also download the source and build it yourself. That would work fine too.