m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/apt.md
blob: d5fa1d92cf2715c564a9c49f3a6a82abb92c1ce7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Apt package manager for Debian

## List installed packages

    apt list --installed

By size

    dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n

## Remove packages

Only removes the binary, leaving behind configs, logs, etc. Does not remove
dependencies.

    apt remove <package>

Remove orphaned dependencies:

    apt autoremove

Purge package (i.e. removes everything, including configs, etc.)

    apt purge <package>
    # or
    apt remove --purge <package>