Cheatography
https://cheatography.com
Debian
dpkg -i PACKAGE_NAME |
Install PACKAGE_NAME |
dpkg -r PACKAGE_NAME |
Remove PACKAGE_NAME |
dpkg -P PACKAGE_NAME |
Remove PACKAGE_NAME and config |
dpkg -l PATTERN |
List packages containing PATTERN |
dpkg -s PACKAGE_NAME |
View PACKAGE_NAME information |
dpkg -i PACKAGE_FILE |
View PACKAGE_FILE information |
dpkg -c PACKAGE_FILE |
List PACKAGE_FILE files |
dpkg -L PACKAGE_NAME |
List PACKAGE_NAME files |
dpkg -S *FILE_NAME |
Find package owning FILE_NAME |
apt-get install PACKAGE_NAME |
Install PACKAGE_NAME |
apt-get update PACKAGE_NAME |
Update package list or PACKAGE_NAME |
apt-get upgrade |
Update all packages |
apt-get remove PACKAGE_NAME |
Remove PACKAGE_NAME |
apt autoremove |
Autoremove unneccesary packages |
apt list |
List installed and available packages |
apt search PATTERN |
Search for PATTERN |
apt-get clean |
Deletes downloaded .deb archive folder |
Downloaded .deb archives in /var/cache/apt/archives |
apt-find list |
List files in packages |
apt-find search |
Search files in packages |
apt-get purge PACKAGE_NAME |
Remove PACKAGE_NAME and config |
apt show PACKAGE_NAME |
Shows more info about package |
apt-cache depends PACKAGE_NAME |
Shows dependencies of a PACKAGE_NAME |
apt-cache rdepends PACKAGE_NAME |
Shows reverse dependencies of a PACKAGE_NAME |
apt-cache PACKAGE_NAME |
Check PACKAGE_NAME versions |
apt-mark hold PACKAGE_NAME |
Prevent PACKAGE_NAME from updating |
Other commands are: unhold, showhold |
Repositories are set in /etc/apt/sources.list |
Zypper
zypper install PACKAGE_NAME |
Install PACKAGE_NAME |
zypper list-updates |
Update package list |
zypper update PACKAGE_NAME |
Update package list or PACKAGE_NAME |
zypper remove PACKAGE_NAME |
Remove PACKAGE_NAME |
zypper info PACKAGE_NAME |
View PACKAGE_NAME information |
zypper se -i |
Search installed packages |
zypper se PACKAGE_NAME |
Search for PACKAGE_NAME |
zypper se --provides |
Shows dependencies |
zypper refresh |
Refresh repositories |
zypper repos |
List repositories |
zypper {add,modify,remove}repo |
{Add,modify,remove} Repository |
|
|
RedHat, Fedora, CentOS, SUSE
rpm -i PACKAGE_NAME |
Install PACKAGE_NAME |
rpm -u PACKAGE_NAME |
Update PACKAGE_NAME |
rpm -e PACKAGE_NAME |
Remove PACKAGE_NAME |
rpm -qa |
List installed packages |
rpm -qi PACKAGE_NAME |
View PACKAGE_NAME information |
rpm -qR PACKAGE_NAME |
View PACKAGE_NAME dependencies |
rpm -q --whatrequires PACKAGE_NAME |
View PACKAGE_NAME requirements |
rpm -qf FILE_NAME |
Find package owning a FILE_NAME |
rpm -ql PACKAGE_NAME |
List PACKAGE_NAME files |
Any of above query commands could run on .rpm file with switch -p |
rpm2cpio |
Converts rpm to cpio |
yum install PACKAGE_NAME |
Install PACKAGE_NAME |
yum check-update PACKAGE_NAME |
Update PACKAGE_NAME |
yum update PACKAGE_NAME |
Update package list or PACKAGE_NAME |
yum upgrade |
Update all packages |
yum remove PACKAGE_NAME |
Remove PACKAGE_NAME |
yum autoremove |
Autoremove unneccesary packages |
yum list {all,available,installed} |
Lists {all,not-installed,installed} packages |
yum info PACKAGE_NAME |
Shows more info about |
yum whatprovides PATTERN |
See PATTERN dependencies |
yum search PATTERN |
Search for PATTERN |
yum repolist all |
List all repositories |
yum-config-manager --add-repo URL |
Add URL as repository |
Yum repos are in /etc/yum.repo.d/*.repo |
yum clean packages |
Clean cached packages |
by default is in /var/cache/yum |
Yum config file in /etc/yum.conf |
dnf install PACKAGE_NAME |
Install PACKAGE_NAME |
dnf upgrade PACKAGE_NAME |
Update PACKAGE_NAME |
dnf remove PACKAGE_NAME |
Remove PACKAGE_NAME |
dnf list --installed |
List installed packages |
dnf repoquery |
List available packages |
dnf info PACKAGE_NAME |
Shows more info about package |
dnf search PATTERN |
Search for PATTERN |
dnf provides FILE_NAME |
Find package owning a FILE_NAME |
dnf repolist |
List repositories |
dnf-config-manager --add_repo URL |
Add URL as repository |
|
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets