-2

I wanted to upgrade Linux. So before I go for an upgrade, I want to know how can I pause an apt-get upgrade and start this the next day from where I left?.

I want to do this because I don't know how long the update would take and how much data it would consume. And also I have a smaller bandwidth.

plzz Tell if you want any more information.

2 Answers2

2

Downloading packages

If you're still downloading packages, you can safely interrupt it. (Ctrl C a few times will cancel it, or refer vanadium's answer to pause).

As long as you don't clean (autoclean etc) your downloaded packages, you should be able to continue the download from where you are with the exception of any partially downloaded package(s). (ie. whatever you've already downloaded will be found in cache & thus not downloaded again). However do NOT sudo apt autoclean or sudo apt-get clean as that will clean your cache and force a re-download of the packages.

This isn't a pause, but I'm describing a cancel & re-start next time using the fully-downloaded packages.

Installing packages

If it's installing the new packages, I'd try and avoid interrupting it (you've already suffered the bandwidth hit anyway)

guiverc
  • 33,561
1

In general, you can interrupt/halt any process in the terminal with the keyboard combination Ctrlz, then later on issue one of the commands fg or bg to have the process resume in the foreground or in the background (terminal is free for other commands).

Note that you cannot shut down the computer: that would terminate all running processes.

It may not be recommended to do this during a system upgrade, as any interference may increase the chance that something goes wrong. Look here for a question on how to upgrade Ubuntu off line.

vanadium
  • 97,564