代码: |
aptitude install pack-foo |
代码: |
aptitude markauto pack-foo #标记成"自动安装" aptitude unmarkauto pack-foo #标记成"手动安装" |
代码: |
hold - 将软件包置于保持状态 unhold - 取消对一个软件包的保持命令 forbid-version - 禁止 aptitude 升级到某一特定版本的软件包。 |
代码: |
sudo aptitude install libcairo2=1.4.10-1ubuntu4 # 强制降级 sudo aptitude forbid-version libcairo2=1.4.10-1ubuntu4.1 # 封掉出错的版本 sudo aptitude markauto libcairo2 #恢复auto属性 |
代码: |
aptitude purge `dpkg -l|grep '^rc'|awk '{print $2}'` |
代码: |
search - 按名称 和/或 表达式搜索软件包 show - 显示一个软件包的详细信息 download - 下载软件包的 .deb 文件 |
代码: |
aptitude search "foo bar" # 关键词 foo 和 bar 都要出现 aptitude search foo bar # 相当于"或" |
代码: |
aptitude::Recommends-Important "false"; |
代码: |
apt-get --print-uris install pack-foo |
代码: |
deb-src http://ubuntu.cn99.com/ubuntu/ gutsy main restricted universe multiverse |
代码: |
apt-get build-dep pack-foo |
代码: |
$ apt-file help apt-file version 2.0.8.2 (c) 2002 Sebastien J. Gross <[email protected]> apt-file [options] action [pattern] Configuration options: --sources-list -s <file> sources.list location --cache -c <dir> Cache directory --architecture -a <arch> Use specific architecture --cdrom-mount -d <cdrom> Use specific cdrom mountpoint --package-only -l Only display packages name --fixed-string -F Do not expand pattern --ignore-case -i Ignore case distinctions --regexp -x pattern is a regular expression --verbose -v run in verbose mode --dummy -y run in dummy mode (no action) --help -h Show this help. --version -V Show version number Action: update Fetch Contents files from apt-sources. search|find <pattern> Search files in packages list|show <pattern> List files in packages purge Remove cache files |