apt和apt-get是Linux下的安装包管理工具
apt是2014年才推出的, 现在已经逐步取代apt-get了

1 apt在线安装包

安装软件 sudo apt install softname1

卸载软件(保留配置) sudo apt remove softname1

卸载软件(清除配置) sudo apt purge softname1

更新软件信息数据库 sudo apt update

进行系统升级sudo apt upgrade, sudo apt distupgrade

搜索软件包 sudo apt-cache search softname1 softname2 softname3……

2 deb离线安装包

安装deb软件包 dpkg -i xxx.deb

删除软件包 dpkg -r xxx.deb

连同配置文件一起删除 dpkg -r --purge xxx.deb

查看软件包信息 dpkg -info xxx.deb

查看文件拷贝详情 dpkg -L xxx.deb

查看系统中已安装软件包信息 dpkg -l

重新配置软件包 dpkg-reconfigure xxx

3 清理系统

删除软件安装包 sudo apt autoclean

删除软件包备份 sudo apt autoremove

4 总结-卸载在线安装包软件

  1. 卸载软件(清除配置) sudo apt purge softname1
  2. 删除不再需要的软件包 sudo apt autoremove