1. apt / apt-get
$ apt list | grep package
$ apt install package
$ apt remove package
$ apt purge package
$ apt-cache search package
$ apt-cache show package
$ apt-get install package
$ apt-get remove package # 撤除软件包 (保留配置文件)
$ apt-get purge package # 撤除软件包, 连同配置文件
$ apt-get autoremove # 撤除不再需要的依赖
$ apt-get clean # 撤除 cache 中所有软件包
$ apt-get autoclean # 撤除已不再需要的软件包
2. dpkg
$ dpkg -l | grep -i package # list package
$ dpkg –i package.deb # install package
$ dpkg –e package # remove package
3. rpm
$ rpm –ivh package.rpm # install package
$ rpm -Uvh packages.rpm # upgrade package
$ rpm -e package # remove package
4. dnf
$ dnf repolist
$ dnf list
$ dnf list installed
$ dnf list available
$ dnf update 或 # dnf upgrade
$ dnf update systemd
$ dnf check-update
$ dnf provides /bin/bash
$ dnf install nano
$ dnf remove nano 或 # dnf erase nano
$ dnf autoremove
$ dnf search nano
$ dnf info nano
$ dnf clean all
$ dnf help clean
$ dnf help
$ dnf history
$ dnf grouplist
$ dnf groupinstall ‘Educational Software’
$ dnf groupupdate ‘Educational Software’
$ dnf groupremove ‘Educational Software’
$ dnf –enablerepo=epel install phpmyadmin # 从特定的软件包库安装特定的软件
$ dnf distro-sync # 更新软件包到最新的稳定发行版
$ dnf reinstall nano
$ dnf downgrade acpid
$ dnf –version
5. yum
$ yum list # 列出所有可安装的软件包
$ yum list updates # 列出所有可更新的软件包
$ yum list installed # 列出所有已安装的软件包
$ yum list extras # 列出所有已安装但不在 Yum Repository
$ yum list package # 列出所指定的软件包
$ yum update # 更新所有 packages
$ yum check-update # 列出所有可更新的 package
$ yum provides package # 列出软件包提供哪些文件
$ yum install epel-release
$ yum install package
$ yum remove package
$ yum search package
$ yum info package
$ yum clean
6. zypper
$ zypper search thunder
$ zypper install Mozilla Thunderbird
$ zypper install download.rpm
$ zypper remove PackageKit
没有评论:
发表评论