Differences between revisions 1 and 2
Revision 1 as of 2004-01-11 21:34:01
Size: 1504
Editor: anonymous
Comment:
Revision 2 as of 2006-03-28 01:47:49
Size: 1613
Comment: Reformatted.
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
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.
Line 4: Line 3:
However, there is a way round it - and this is how I did it. == "apt-get dist-upgrade" in limited hard drive space ==
Line 6: Line 5:
Firstly, create a file which lists the packages that will be updates thus: Having a small hard drive can make ''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.
Line 8: Line 7:
apt-get -s -u upgrade || sed -n -e ''^Inst'',/^Conf/p -e /^Conf/q || cut -d" " -f2 >update.packages However, there is a way round it. This is how I did it. First, create a file which lists the packages that will be updated 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, have a look at it and guage whether you think it is too long. Any packages that you recognise to be heavyweights, take them out for now. If you're running really low end, you can even update it a package at a time.
Line 10: Line 13:
This will create a file called update.packages which has a list of packages to update. Before you do anything else, have a look at it and guage whether you think it is too long. Any packages that you recongnise to be heavy-weights, take them out for now. If you're running really low end, you can even update it a package at a time. Next, you need to download those packages:{{{
for f in $(cat update.packages); do apt-get install $f; done
}}}
This runs a loop which looks at the packages in update.packages and installs them.
Line 12: Line 18:
Next, you need to download those packages: Next, you need to clean things up to make room for the next cycle of install with:{{{
apt-get clean
}}}
Then repeat the process until {{{update.packages}}} no longer has any text in it (which means there are no other packages to update).
Line 14: Line 23:
for f in $(cat update.packages); do apt-get install $f; done

This runs a look which looks at the packages in update.packages and installs them.

Next, you need to clean things up to make room for the next cycle of install with:

apt-get clean

Then repeat the process until update.packages no longer has any text in it (which means there are no other packages to update).

Finally, you can carry out apt-get dist-upgrade, which on my machine managed to work. This could still fill up your machine in theory.
Finally, you can carry out {{{apt-get dist-upgrade}}}, which on my machine managed to work. This could still fill up your machine in theory.

"apt-get dist-upgrade" in limited hard drive space

Having a small hard drive can make 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. This is how I did it. First, create a file which lists the packages that will be updated 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, have a look at it and guage whether you think it is too long. Any packages that you recognise to be heavyweights, take them out for now. If you're running really low end, you can even update it a package at a time.

Next, you need to download those packages:

for f in $(cat update.packages); do apt-get install $f; done

This runs a loop which looks at the packages in update.packages and installs them.

Next, you need to clean things up to make room for the next cycle of install with:

apt-get clean

Then repeat the process until update.packages no longer has any text in it (which means there are no other packages to update).

Finally, you can carry out apt-get dist-upgrade, which on my machine managed to work. This could still fill up your machine in theory.

I'm interested to hear if anyone can script this, so that it becomes more automatic. Please leave any suggestions here.