aptitude 使用快速参考

aptitude 与 apt-get 一样,是 Debian 及其衍生系统中功能极其强大的包管理工具。与 apt-get 不同的是,aptitude 在处理依赖问题上更佳一些。举例来说,aptitude 在删除一个包时,会同时删除本身所依赖的包。这样,系统中不会残留无用的包,整个系统更为干净。以下是笔者总结的一些常用 aptitude 命令,仅供参考。

命令 作用
aptitude update 更新可用的包列表
aptitude upgrade 升级可用的包
aptitude dist-upgrade 将系统升级到新的发行版
aptitude install pkgname 安装包
aptitude remove pkgname 删除包
aptitude purge pkgname 删除包及其配置文件
aptitude search string 搜索包
aptitude show pkgname 显示包的详细信息
aptitude clean 删除下载的包文件
aptitude autoclean 仅删除过期的包文件

当然,你也可以在文本界面模式中使用 aptitude。

Read More:

9 Comments

  1. 1 karron Commented @ 2006-11-25 11:40Reply to this comment

    edgy的apt-get有个autoremove的命令,也会自动清除没有用的包.

  2. 2 我本疯狂 Trackbacked @ 2006-11-25 11:46Reply to this comment

    aptitude 使用快速参考...

    aptitude 与 apt-get 一样,是 Debian 及其衍生系统中功能极其强大的包管理工具。与 apt-get 不同的是,aptitude 在处理依赖问题上更佳一些。举例来说,aptitude 在删除一个包时,会同时删除本身所依....

  3. 3 Toy Commented @ 2006-11-25 11:56Reply to this comment

    @karron:谢谢你的提示!呵呵,我已经更新到另一篇 apt 的总结中了。

  4. 4 jjk Commented @ 2006-11-26 22:28Reply to this comment

    hi,有个问题,请教一下,怎么查找我apt安装的软件都安装在哪个目录下了?

  5. 5 luren Commented @ 2006-11-27 16:34Reply to this comment

    奇怪为什么aptitude不直接支持安装非源里的软件包

  6. 6 luren Commented @ 2006-11-27 16:35Reply to this comment

    jjk, dpkg -L 软件包

  7. 7 carelezz Commented @ 2006-12-12 14:28Reply to this comment

    aptitude 与 apt-get 最好不要混用,因为双方都不知道对方做了些什么。否则 aptitude 会删除一些 apt-get build 的套件。

  8. 8 Toy Commented @ 2006-12-13 8:55Reply to this comment

    @carelezz:谢谢你的提示。

  9. 9 autoxbc Commented @ 2009-12-27 0:18Reply to this comment

    @carelezz:aptitude 和 apt synaptic 共用 dpkg 的核心数据,根本不会引起混乱,aptitude 另外用一份数据量很小的扩展标记来实现所谓更佳的管理。本质上 aptitude 就是 apt 的前端,前端会不会把后端搞坏?