Let's say I want to install something big... (kde for example) but I'm doing it in a place with a very poor internet conection, so I want to stop it, and doing it later. But I don't want to start all over again. Can it be done?
Let's say I want to install something big... (kde for example) but I'm doing it in a place with a very poor internet conection, so I want to stop it, and doing it later. But I don't want to start all over again. Can it be done?
Do
apt-get install -d STUFF
which will download everything to the cache but won't act on it.Later when you have a better connection you can just drop the -d and apt will download the rest if needed and begin installing from the cache:
/var/cache/apt/archives/
If you kill an apt-get while it's still in the stage of fetching packages then yes, it will resume fetching pretty much from where it left off - the archvies it has fetched so far will be kept in /var/cache/apt/archives.
This is the directory that gets cleaned up by
apt-get clean
, incidentally.If you kill it after it's finished fetching and has started configuring/installing then you're in much deeper water and I wouldn't really want to try it ;)
Or, start the installation with GNU Screen. Just run
screen
by itself, and it will open a new window with a shell inside it. If you run commands here, then press Ctrl-d (^d
), the window will "detach" from your current terminal, but it will stay running in the background: runscreen -x
to get back to it.This also works for long-running command such as apt-get install [all of KDE]: just start the apt-get install command inside a screen window and press ^d. Then later, simply re-attach using
screen -x
and see if it's done.Screen has much more options:
^a c
will create new windows (use^a 1
to go to the first one,^a n
to go to the one "to the right", etc). See http://www.gnu.org/software/screen/manual/ for the manual!Edit: Of course, the computer running
screen
windows cannot be restarted, or the windows will be lost.