Difference between revisions of "Package Manager Options"
From Rosalab Wiki
m (1 revision) |
(translated to English) |
||
Line 1: | Line 1: | ||
[[Category:Package Management]] | [[Category:Package Management]] | ||
− | + | Mapping of options of various package management tools. | |
{| class='wikitable' | {| class='wikitable' | ||
− | ! | + | ! Action !! rpm4/yum !! deb/apt !! rpm5/urpmi |
|- | |- | ||
− | | | + | | Check if package is installed |
− | | rpm -qa <nowiki>|</nowiki> grep '' | + | | rpm -qa <nowiki>|</nowiki> grep ''package_name'' |
− | rpm -qi '' | + | rpm -qi ''package_name'' |
− | | dpkg-query -s '' | + | | dpkg-query -s ''package_name'' |
− | dpkg-query -l '' | + | dpkg-query -l ''package_name_pattern'' |
− | dpkg-query -l '' | + | dpkg-query -l ''package_name'' |
− | | rpm -qa <nowiki>|</nowiki> grep '' | + | | rpm -qa <nowiki>|</nowiki> grep ''package_name'' |
− | rpm -qi '' | + | rpm -qi ''package_name'' |
|- | |- | ||
− | | | + | | Check which package <br>provides the file |
− | | rpm -qf '' | + | | rpm -qf ''file_name'' |
− | ( | + | (for installed packages only) |
− | yum whatprovides '' | + | yum whatprovides ''file_name'' |
− | | dpkg-query -S '' | + | | dpkg-query -S ''file_name'' |
− | dpkg -S '' | + | dpkg -S ''file_name'' |
− | | rpm -qf '' | + | | rpm -qf ''file_name'' |
− | ( | + | (for installed packages only) |
− | urpmf '' | + | urpmf ''file_name'' |
|- | |- | ||
− | | | + | | List package content |
− | | rpm -ql '' | + | | rpm -ql ''package_name'' |
| dpkg -с | | dpkg -с | ||
dpkg --contents | dpkg --contents | ||
− | | rpm -ql '' | + | | rpm -ql ''package_name'' |
− | urpmq -l '' | + | urpmq -l ''package_name'' |
|- | |- | ||
− | | | + | | Display information <br>about installed package |
− | | rpm -qi '' | + | | rpm -qi ''package_name'' |
− | | dpkg-query -s '' | + | | dpkg-query -s ''package_name'' |
− | dpkg-query -l '' | + | dpkg-query -l ''package_name'' |
− | dpkg -s '' | + | dpkg -s ''package_name'' |
− | dpkg -l '' | + | dpkg -l ''package_name'' |
− | | rpm -qi '' | + | | rpm -qi ''package_name'' |
− | urpmq -i '' | + | urpmq -i ''package_name'' |
|- | |- | ||
− | | | + | | Display information about a package <br>not installed in the system |
− | | yum info '' | + | | yum info ''package_name'' |
− | | apt-cache showpkg '' | + | | apt-cache showpkg ''package_name'' |
− | | urpmq -i '' | + | | urpmq -i ''package_name'' |
|- | |- | ||
− | | | + | | Display information about <br/downloaded package |
| rpm -qip | | rpm -qip | ||
| dpkg -I | | dpkg -I | ||
| rpm -qip | | rpm -qip | ||
|- | |- | ||
− | | | + | | Verify package consistency |
|rpm -Va | |rpm -Va | ||
− | rpm -V '' | + | rpm -V ''package_name'' |
| debsums -as | | debsums -as | ||
− | debsums '' | + | debsums ''package_name'' |
|rpm -Va | |rpm -Va | ||
− | rpm -V '' | + | rpm -V ''package_name'' |
|- | |- | ||
− | | | + | | Unpack package content |
− | | rpm2cpio '' | + | | rpm2cpio ''package_name'' <nowiki>|</nowiki> cpio -id |
− | | dpkg --extract '' | + | | dpkg --extract ''package_name'' |
− | | rpm2cpio '' | + | | rpm2cpio ''package_name'' <nowiki>|</nowiki> cpio -id |
|- | |- | ||
− | | | + | | Install a package <br>(without installing dependencies) |
− | | rpm -ivh '' | + | | rpm -ivh ''package_name'' |
− | | dpkg -i ./'' | + | | dpkg -i ./''package_name'' |
− | | rpm -ivh '' | + | | rpm -ivh ''package_name'' |
|- | |- | ||
− | | | + | | Uninstall package («low-level») |
− | | rpm -e '' | + | | rpm -e ''package_name'' |
− | | dpkg -r '' | + | | dpkg -r ''package_name'' |
− | dpkg -P '' | + | dpkg -P ''package_name'' (with all config files) |
− | | rpm -e '' | + | | rpm -e ''package_name'' |
|- | |- | ||
− | | | + | | Install package from network <br>(with all dependencies) |
− | | yum install '' | + | | yum install ''package'' |
− | | apt-get install '' | + | | apt-get install ''package'' |
− | aptitude install '' | + | aptitude install ''package'' |
− | | urpmi '' | + | | urpmi ''package'' |
|- | |- | ||
− | | | + | | Uninstall package |
− | | yum remove '' | + | | yum remove ''package'' |
− | | apt-get remove '' | + | | apt-get remove ''package'' |
− | aptitude remove '' | + | aptitude remove ''package'' |
− | | urpme '' | + | | urpme ''package'' |
|- | |- | ||
− | | | + | | "Soft" system update |
| yum update | | yum update | ||
| apt-get upgrade | | apt-get upgrade | ||
Line 98: | Line 98: | ||
| urpmi --auto-update | | urpmi --auto-update | ||
|- | |- | ||
− | | | + | | Upgrade system to a newer release |
| yum upgrade | | yum upgrade | ||
| apt-get dist-upgrade | | apt-get dist-upgrade | ||
aptitude full-upgrade | aptitude full-upgrade | ||
| urpmi --auto-update | | urpmi --auto-update | ||
− | ( | + | (with [http://wiki.mandriva.com/en/Tools/urpmi/Upgrade new repositories]) |
|- | |- | ||
− | | | + | | Sync db with repository |
− | | | + | | Automatically |
| apt-get update | | apt-get update | ||
aptitude update | aptitude update | ||
| urpmi.update -a | | urpmi.update -a | ||
|- | |- | ||
− | | | + | | Look for a package by its name or file |
− | | yum whatprovides '' | + | | yum whatprovides ''query'' |
| 'apt-cache search' + 'apt-file search' | | 'apt-cache search' + 'apt-file search' | ||
| 'urpmq -y' + 'urpmf' | | 'urpmq -y' + 'urpmf' | ||
|- | |- | ||
− | | | + | | Look for a package using regex or partial name |
− | | yum search '' | + | | yum search ''query'' |
− | | apt-cache search '' | + | | apt-cache search ''query'' |
− | aptitude search '' | + | aptitude search ''query'' |
− | | urpmq --list <nowiki>|</nowiki> grep '' | + | | urpmq --list <nowiki>|</nowiki> grep ''query'' |
− | urpmq -y '' | + | urpmq -y ''partial_name'' |
|- | |- | ||
− | | | + | | Delete unecessary dependencies <br>from the system |
− | | | + | | ''not supported'' |
| apt-get autoremove | | apt-get autoremove | ||
| urpme --auto-orphans | | urpme --auto-orphans | ||
|- | |- | ||
− | | | + | | Complete cache cleanup |
| yum clean all | | yum clean all | ||
| apt-get clean | | apt-get clean | ||
Line 134: | Line 134: | ||
| urpmi --clean | | urpmi --clean | ||
|- | |- | ||
− | | " | + | | "Clever" cache cleanup (drop not installed packages) |
| | | | ||
| apt-get autoclean | | apt-get autoclean | ||
aptitude autoclean | aptitude autoclean | ||
|} | |} | ||
+ | |||
+ | [[ru:Package_Manager_Options]] | ||
+ | [[en:Package_Manager_Options]] |
Revision as of 11:45, 1 March 2012
Mapping of options of various package management tools.
Action | rpm4/yum | deb/apt | rpm5/urpmi |
---|---|---|---|
Check if package is installed | rpm -qa | grep package_name
rpm -qi package_name |
dpkg-query -s package_name
dpkg-query -l package_name_pattern dpkg-query -l package_name |
rpm -qa | grep package_name
rpm -qi package_name |
Check which package provides the file |
rpm -qf file_name
(for installed packages only) yum whatprovides file_name |
dpkg-query -S file_name
dpkg -S file_name |
rpm -qf file_name
(for installed packages only) urpmf file_name |
List package content | rpm -ql package_name | dpkg -с
dpkg --contents |
rpm -ql package_name
urpmq -l package_name |
Display information about installed package |
rpm -qi package_name | dpkg-query -s package_name
dpkg-query -l package_name dpkg -s package_name dpkg -l package_name |
rpm -qi package_name
urpmq -i package_name |
Display information about a package not installed in the system |
yum info package_name | apt-cache showpkg package_name | urpmq -i package_name |
Display information about <br/downloaded package | rpm -qip | dpkg -I | rpm -qip |
Verify package consistency | rpm -Va
rpm -V package_name |
debsums -as
debsums package_name |
rpm -Va
rpm -V package_name |
Unpack package content | rpm2cpio package_name | cpio -id | dpkg --extract package_name | rpm2cpio package_name | cpio -id |
Install a package (without installing dependencies) |
rpm -ivh package_name | dpkg -i ./package_name | rpm -ivh package_name |
Uninstall package («low-level») | rpm -e package_name | dpkg -r package_name
dpkg -P package_name (with all config files) |
rpm -e package_name |
Install package from network (with all dependencies) |
yum install package | apt-get install package
aptitude install package |
urpmi package |
Uninstall package | yum remove package | apt-get remove package
aptitude remove package |
urpme package |
"Soft" system update | yum update | apt-get upgrade
aptitude safe-upgrade |
urpmi --auto-update |
Upgrade system to a newer release | yum upgrade | apt-get dist-upgrade
aptitude full-upgrade |
urpmi --auto-update
(with new repositories) |
Sync db with repository | Automatically | apt-get update
aptitude update |
urpmi.update -a |
Look for a package by its name or file | yum whatprovides query | 'apt-cache search' + 'apt-file search' | 'urpmq -y' + 'urpmf' |
Look for a package using regex or partial name | yum search query | apt-cache search query
aptitude search query |
urpmq --list | grep query
urpmq -y partial_name |
Delete unecessary dependencies from the system |
not supported | apt-get autoremove | urpme --auto-orphans |
Complete cache cleanup | yum clean all | apt-get clean
aptitude clean |
urpmi --clean |
"Clever" cache cleanup (drop not installed packages) | apt-get autoclean
aptitude autoclean |