Using dpkg to install upgrade and dist-upgrade packages
So I'm playing around with offline package installation on 12.04 Server, having downloaded packages by retrieving and wgetting their URIs using the instructions here: http://www.webupd8.org/2009/11/get-list-of-packages-and-dependencies.html
I did this with apt-get upgrade
and apt-get dist-upgrade
, then went about installing the downloaded packages using dpkg -i
. So the process looked like so:
- Get URIs
-
wget
the packages to a folder (upgrade
packages to /upgrade anddist-upgrade
packages to /dist-upgrade) - run
dpkg -i /upgrade/*.deb
and thendpkg -i /dist-upgrade/*.deb
My question is: would this method of manually installing the updated packages correctly get everything updated, giving the same result as if I'd just run apt-get upgrade
and apt-get dist-upgrade
normally?
Or is there something that the normal apt-get
commands do that wouldn't get done with this way?
Instead of using dpkg
, which is a low level package manager, you'd be better off using apt
. To install the .deb files using apt
, copy them to the apt cache
sudo cp *.deb /var/cache/apt/archives/
and then just do the regular upgrade:
apt-get upgrade
The apt
command will use the files in its cache rather than downloading it off the net, so that pretty much serves your purpose.