4.2 Checking APT configuration status
Pure Debian stable system:
- APT does not have sources besides current release
- No software from other release or thrid party installed
- Source-list files are consistent
Direct upgrade from across more than one release is not supported.
Need to upgrade to latest current release before upgrading to next major release.
Prevent conflicts in advance:
proposed-updatesection in source-list
- Check non-Debian and unofficial packages
- Disable APT pinning of packages
dpkg -l to check all packages is in upgradable state, and no essential package is on hold. However, changed and compiled packages should still be hold and not upgrade them.
4.3 Preparing APT source-list files
Reconfigure source-list files:
- APT will install package with highest version number, giving priority to first entry in files.
- List sources in order of local drive, CD-ROMs, remote mirrors.
- Add sources of latest release and remove sources for last release.
4.4 Upgrading packages
aptto upgrade release (for interactive use).
- Don’t use
aptin scripts, use
Record the upgrade session for future investigation:
$ script -t 2>~/upgrade-buster-$step.time -a ~/upgrade-buster-$step.script
aptwill log changed package states in
/var/log/apt/history.logand terminal output in
dpkgwill log all package state changes in
Now update all available packages to be fetched by
Estimate disk space needed for the installation and make sure there is enough space to download packages in
$ apt -o APT::Get::Trivial-Only=true full-upgrade
After the download, you will probably need more space in other file system partitions in order to both install upgraded packages (which might contain bigger binaries or more data) and new packages that will be pulled in for the upgrade. If your system does not have sufficient space you might end up with an incomplete upgrade that is difficult to recover from.
If there is no space:
- Remove packages downloaded for installation
- Remove forgotten packages (automatically installed and no longer used)
- Find redundant packages, manually review and remove them
- Remove translations and localization files
- Remove or move system log files to other systems
- Use a temporary
- Do a minimal system upgrade
The upgrade is recommend in a two-part process:
- Do a minimal system upgrade:
- Upgrade packages without removing or installing other packages
- Useful if system is tight on space or cannot run full upgrade
- Upgrade the system:
- Perform a complete upgrade of the system
- Resolves all dependency changes between packages in different releases
- Install new packages and remove conflicting obsoleted packages