apt

原创
2017/09/30 08:39
阅读数 89

在 Ubuntu 16.04 上操作的...

APT 命令帮助

~# apt --help
apt 1.2.24 (amd64)
Usage: apt [options] command

apt is a commandline package manager and provides commands for
searching and managing as well as querying information about packages.
It provides the same functionality as the specialized APT tools,
like apt-get and apt-cache, but enables options more suitable for
interactive use by default.

Most used commands:
  list - list packages based on package names
  search - search in package descriptions
  show - show package details
  install - install packages
  remove - remove packages
  autoremove - Remove automatically all unused packages
  update - update list of available packages
  upgrade - upgrade the system by installing/upgrading packages
  full-upgrade - upgrade the system by removing/installing/upgrading packages
  edit-sources - edit the source information file

See apt(8) for more information about the available commands.
Configuration options and syntax is detailed in apt.conf(5).
Information about how to configure sources can be found in sources.list(5).
Package and version choices can be expressed via apt_preferences(5).
Security details are available in apt-secure(8).
                                        This APT has Super Cow Powers.

常用操作

  • apt update & apt full-upgrade更新软件源后升级软件和系统.
  • apt install <packname>安装某项软件包
  • apt clean清除apt update后形成的软件包缓存,缓存大小可用du -sh /var/cache/apt/命令查看
  • apt autoclean清除已卸载的软件包,就是把下载并安装又卸载了的软件的安装文件从硬盘中删除
  • apt autoremove删除那些为满足其他软件依赖而安装的,但现在不需要的软件包
  • apt remove <packname>删除指定的软件包,但保留配置文件等
  • apt purse <packname>删除指定的软件包,同时删除配置文件,会删的比较干净,所以叫purse

参考文档

展开阅读全文
加载中
点击引领话题📣 发布并加入讨论🔥
0 评论
0 收藏
0
分享
返回顶部
顶部