My Internet gets paused sometimes because of change in the 3g signal strength and I've to restart the whole apt-get update process again! Each update consumes 13-15 mb and every mb costs here!! Can I do something to pause the update so that I can resume it after I connect my Internet again! p.s - I know that I can resume downloads of apps/upgrade
Looking at the recommendations for using Ctrl+C, I think it'd be better to try Ctrl+Z to suspend the process in the background when/if the network drops. You might be able to use
fg to resume once your connectivity returns. (I don't know how robust apt-get is in this scenario, though.)
Another possibility would be using
axel and the
apt-fast script. It is advertised as speeding up downloads by doing parallel downloads, but it also seems to be good about keeping track of what's already been downloaded, presumably because it has to track the file pieces as it downloads in parallel chunks.
aptitude told me after unexpected reboot, use:
sudo dpkg --configure -a
man dpkg explains:
If -a or --pending is given instead of package, all unpacked but unconfigured packages are configured.
Installing/Updating is an atomic operation. Either it completes, or it doesn't. If the update breaks/stops then it rollbacks to the last point before update began. Because the headers (files that contain data of packages, and where to fetch them from) The packages however, begin downloading from the point that your connection broke off. Just a word of advice, dont interrupt an install, chances are that it will make the system unusable.
I dont like terminal. Neither know whether it is possible using terminal or not. But there is a bad way of doing what you have asked. For this you need "Synaptic Package Manager". If you don’t have this then first install it. Now if you have it then, open it; Click on "Mark All Upgrades". This will bring up all the upgradable (updatable) packages. Now start downloading packages until your connection is lost. If the connection is lost, Synaptic will complain about it and stop upgrading. No worries, close synaptic package manager. (Do not open Software centre or use apt-get through command line until up-gradation is finished.)
Now after reconnecting, start synaptic again. And again click on "Mark all Upgrades" and start updating. This time you will see, only those packages which were failed to download, are getting downloaded and others are skipped.
This is not a good solution, but it works. If synaptic or software center complain about some kind of "Lock" then go to /var/cache/apt/archives and delete the "lock" file and you will be good to go :)