APT package management
The simplified event flow of the package management by APT:
- Update (
"apt update", "aptitude update" or "apt-get update"
):
- Fetch archive metadata from remote archive
- Reconstruct and update local metadata for use by APT
- Upgrade (
"apt upgrade" and "apt full-upgrade" or "aptitude
safe-upgrade" and "aptitude full-upgrade" or "apt-get upgrade" and "apt-get dist-upgrade"
):
- Chose candidate version which is usually the latest available version for all
installed packages
- Make package dependency resolution
- Fetch selected binary packages from remote archive if candidate version is
different from installed version
- Unpack fetched binary packages
- Run preinst script
- Install binary files
- Run postinst script
- Install (
"apt install ...", "aptitude install ..." or "apt-get install ..."
):
- Chose packages listed on the command line
- Make package dependency resolution
- Fetch selected binary packages from remote archive
- Unpack fetched binary packages
- Run preinst script
- Install binary files
- Run postint script
- Remove (
"apt remove ...", "aptitude remove ..." or "apt-get remove ..."
):
- Chose packages listed on the command line
- Make package dependency resolution
- Run prerm script
- Remove installed files except configuration files
- Run postrm script
- Purge (
"apt purge ...", "aptitude purge ..." or "apt-get purge ..."
):
- Chose packages listed on the command line
- Make package dependency resolution
- Run prerm script
- Remove installed files including cinfiguration files
- Run postrm script