#apt
重新从源仓库中同步文件索引

# apt-get update

列出所有可用包

 apt-cache pkgnames

使用关键字搜索包

# apt-cache search "postgresql"

列出已经安装的包

# dpkg -l | grep -i post

列出指定包的基本信息

# apt-cache show postgresql-common

列出指定包的依赖

# apt-cache depends postgresql-common

安装指定包

# apt-get install postgresql-common

升级所有包

# apt-get upgrade

卸载指定包,保留配置文件

# apt-get remove postgresql-common

删除指定包配置文件

# apt-get purge postgresql-common

卸载指定包,同时删除配置文件

# apt-get remove --purge postgresql-common

#dpkg
查看当前系统中已经安装的软件包的信息

dpkg -l 

(软件包名称)查看系统中已经安装的软件文件的详细列表

dpkg -L *.deb

查看已经安装的指定软件包的详细信息

dpkg -s *.deb

查看系统中的某个文件属于那个软件包

dpkg -S

文件的安装

dpkg -i *.deb

文件的卸载;

dpkg -r *.deb

彻底的卸载 包括软件的配置文件等

dpkg -P *.deb

查看没有安装的deb包命令
查询deb包文件中所包含的文件 rpm -qlp

dpkg -c *.deb

查询deb包的详细信息

dpkg -I *.deb

相关文章:

  • 2022-02-11
  • 2021-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
  • 2021-09-13
  • 2021-09-30
  • 2022-02-26
  • 2021-08-19
相关资源
相似解决方案