Skip to content

Debian Maintenance

Eric Wu edited this page Feb 13, 2016 · 13 revisions

* indicates the tasks that are most often used

  • apt-get update *

update is used to resynchronize the package index files from their sources.

  • apt-get upgrade *

upgrade is used to install the newest versions of all packages currently installed on the system from the sources enumerated in /etc/apt/sources.list.

  • apt-get dist-upgrade

dist-upgrade in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages; apt-get has a "smart" conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary. The dist-upgrade command may therefore remove some packages. Note when upgrade fails (e.g. when seeing packages been kept back), can try dist-upgrade.

  • apt-get autoremove *

autoremove is used to remove packages that were automatically installed to satisfy dependencies for other packages and are now no longer needed.

  • apt-get autoclean *

autoclean clears out the local repository of retrieved package files. The difference is that it only removes package files that can no longer be downloaded, and are largely useless.

  • apt-get clean

clean clears out the local repository of retrieved package files.

  • apt-get remove

remove is identical to install except that packages are removed instead of installed. Note that removing a package leaves its configuration files on the system.

  • apt-get purge

purge is identical to remove except that packages are removed and purged (any configuration files are deleted too).

Clone this wiki locally