[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#406131: - Document how to do partial updates for users tight on space



I propose this text for addressing the issue :

*******************************************************************
Packages needed for the upgrade are fetched in /var/cache/apt/archives. As a
consequence, all your remaining space could be used only for fetching the
packages. If you cannot free enough space by means of the tips in section
id="sufficient-space", here are two other solutions.

1 - Using a temporary /var/cache/apt/archives
---------------------------------------------
You can temporarily move the cache directory to a temporary partition (
USB storage device, temporary hard disk, ...).


Note : do not use a NFS mount as the network connection could be interrupted
       during the upgrade

E.g, for a usb key with special device file /dev/sdc1,
assuming it is mounted on /media/usbkey:

Remove the packages that have been previously downloaded for installation:
#  apt-get clean

Copy the content of /var/cache/apt/archives to the usb key:
#  cp -ax /var/cache/apt/archives/* /media/usbkey/

Disable the current archives directory and mount the temporary one:
#  mv /var/cache/apt/archives /var/cache/apt/archives.orig
#  mkdir /var/cache/apt/archives
#  umount /media/usbkey
#  mount /dev/sdc1 /var/cache/apt/archives

After the upgrade, restore the original /var/cache/apt/archives directory:
#  umount /var/cache/apt/archives
#  rmdir /var/cache/apt/archives
#  mv /var/cache/apt/archives.orig /var/cache/apt/archives

2 - Upgrading step by step with intermediate cache cleaning
-----------------------------------------------------------
You are higly encouraged to remove the packages which are not currently needed
(X server, desktop environment, packages taking a large amount of space, ...).
You can always reinstall them after the upgrade. The lesser packages you have
installed, the lesser you will need to fetch at once because of dependencies
to satisfy.

You can follow the upgrading steps from section id="sufficient-space" and stop
before section id="upgrading-other". Skip the step id="minimal-upgrade".
After each step, clean the /var/cache/apt/archives directory by running:
#  aptitude clean

Once you have done all the upgrading steps before section id="upgrading-other",
you can upgrade all the packages for the three first priorities of packages
i.e. 'required', 'important', 'standard'. Don't forget to clean the cache
between each upgrade.

Upgrading all the packages of priority 'required' is done by running:
#  aptitude install "~i~prequired"

Subsequently replace 'required' by 'important' and 'standard' to upgrade the
packages for those priorities.

You can now try to do a minimal upgrade by running:
#  aptitude safe-upgrade

In the case you don't have enough space to do the minimal upgrade, note which
packages will be upgraded and try yourself to upgrade subsequently a small
amount of them by running:
#  aptitude install package_1 package_2 ... package_n

where package_1 package_2 ... package_n are the n packages you want to upgrade
at once.

After several upgrades of small amount of packages, you should get to the
point where you have finally enough space to run the minimal upgrade:
#  aptitude safe-upgrade

Now you can try to upgrade the packages for the two last priorities i.e.
'optional' and 'extra', or do the full upgrade (id="upgrading-other").
If required, do the same as with the minimal upgrade; note the packages that
would be upgraded and try to upgrade them yourself in small bunches of
packages, doing cache cleaning between each other.

Finally, you will get to the point where you have enough space to do the
full upgrade:
#  aptitude full-upgrade

Note:
- be very carefull to the solution aptitude gives you for fixing the broken
  dependencies, especially the packages that it will remove. It is often
  better to reject its solution, install a single package for fixing the
  dependency and then re-run the previous command.
**********************************************************************

--
Giovanni



Reply to: