-
Notifications
You must be signed in to change notification settings - Fork 3
Package management
#Packages Typically packages are nothing more that some kind of archive. ##DEB AR archive with following files included:
- debian-binary
- control.tar.gz
- data.tar.gz (since Debian 8: data.tar.xz)
##RPM todo
#APT/Aptitude Highest priority number means highest priority of package.
Show available/installed package version:
aptitude versions the_package
or dpkg-query -l | grep the_package
Upgrade/downgrade only one specific package:
apt-get install --only-upgrade the_package
Remove dangling packages:
apt-get autoremove --purge
Remove old cached packages:
aptitude autoclean
Remove cached packages:
aptitude clean
##Preferences
Mechanism that determines which version of the package will be installed (consult: man apt_preferences
).
Used to pick package version when apt list files (/etc/apt/sources.list
or /etc/apt/sources.list.d/*.list
) contains references to more than one distribution eg. contains both stable and testing repositories.
- Normally without using apt_preferences the apt will pick the package coming from the first entry in
sources.list
. - If no preferences exists or contains no entry for given package then the package priority is the priority of distro.
- To “force” usage of some other distro, use
-t
flag (specify target release), eg.apt-get install -t experimental some-package
. If-t
is given then check manapt_preferences
for algorithm that assign priority for package. It roughly specifies:- If target release contains in release files “NotAutomatic: yes” but not “ButAutomaticUpgrades: yes”. Then the priority is 1
- If package is installed or if target release’s release file contains “NotAutomatic: yes” and “ButAutomaticUpgrades: yes”. Then the priority is 100
- If the package is not installed and do not belong to the target release. Then the priority is 500
- If the package is not installed and belong to the target release. Then the priority is 990.
- Installs version with highest priority (highest number).
Please mind that if you have configured package pinning and e.g. your stable is configured to have priority of 995 (or anything greater than 990) then -t
will have no effect.
You can always verify with apt-cache policy -t target-release package
which exact version of package is going to be installed
#References
- General
- OS
- Networks
- Configuration
- Protocols
- Link layer
- Sockets
- Routing
- Tunneling
- Debugging
- LoRa
- Virtualization
- Infrastructure as a code
- Desktop environments
- Monitoring
- Benchmarking