/etc/apt/sources.list 

apt-cache search package

获取包的相关信息,如说明、大小、版本等

apt-cache show package

root@web2:/# apt-cache show libpng12-dev

Package: libpng12-dev

Priority: optional

Section: libdevel

Installed-Size: 632

Maintainer: Anibal Monsalve Salazar

Architecture: i386

Source: libpng

Version: 1.2.44-1

Replaces: libpng12-0-dev, libpng3-dev (<= 1.2.5)

Provides: libpng-dev, libpng12-0-dev, libpng3-dev

Depends: libpng12-0 (= 1.2.44-1), zlib1g-dev

Conflicts: libpng-dev, libpng12-0-dev, libpng2 (<< 1.0.12-3), libpng2-dev

Filename: pool/main/libp/libpng/libpng12-dev_1.2.44-1_i386.deb

Size: 261098

MD5sum: eeb4931441782c7dfa44754746ffd1b3

SHA1: 1821647b0b01c1ebb557ac3c0bafe296c41ef8fc

SHA256: 1f4fe493c6d46785f308eeef329a01783374b288ed48f6cfc0cbc1a76d59789c

Description: PNG library - development

 libpng is a library implementing an interface for reading and writing

 PNG (Portable Network Graphics) format files.

 .

 This package contains the header and development files needed to build

 programs and packages using libpng.

Homepage: http://libpng.org/pub/png/libpng.html

Tag: devel::lang:c, devel::library, role::devel-lib, works-with::p_w_picpath, works-with::p_w_picpath:raster

重新安装包

sudo apt-get install package – - reinstall

修复安装”-f = ——fix-missing”

sudo apt-get -f install

删除包

sudo apt-get remove package

删除包,包括删除配置文件等

sudo apt-get remove package – - purge

更新源

sudo apt-get update

更新已安装的包

sudo apt-get upgrade

升级系统

sudo apt-get dist-upgrade

使用 dselect 升级

sudo apt-get dselect-upgrade

了解使用依赖

apt-cache depends package

是查看该包被哪些包依赖

apt-cache rdepends package

安装相关的编译环境

sudo apt-get build-dep package

下载该包的源代码

apt-get source package

清理无用的包

sudo apt-get clean && sudo apt-get autoclean

检查是否有损坏的依赖

sudo apt-get check

参考网页:http://leez.org/66/