Having a small hard drive can make apt-get dist-upgrades a complete nightmare, as apt-get likes to download everything and then dist-upgrade, filling up your harddrive before the download is complete.
However, there is a way round it – and this is how I did it.
Firstly, create a file which lists the packages that will be updates thus:
apt-get -s -u upgrade | sed -n -e Inst,/Conf/p -e /^Conf/q | cut -d” ” -f2 >update.packages
This will create a file called update.packages which has a list of packages to update. Before you do anything else, [continued…]