> For the complete documentation index, see [llms.txt](https://strangebutohwell.gitbook.io/knowledge/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://strangebutohwell.gitbook.io/knowledge/linux/package-management/apt-commands.md).

# apt Commands

## dist-upgrade

In addition to performing the function of upgrade, dist-upgrade also intelligently handles changing dependencies with new versions of packages.&#x20;

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.

## purge

Purging an installed package will remove the package as well as any associated configuration files.&#x20;

&#x20;`apt-get --purge remove <package>`&#x20;

In newer distributions, purge can be used as a standalone command:

`apt-get purge <package>`

Purge can also be used with the *autoremove* command to remove configuration files associated with packages that are to be removed:

`apt-get --purge autoremove`<br>
