m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Chrzanowski <m@m-chrzan.xyz>2024-01-30 21:49:35 +0100
committerMarcin Chrzanowski <m@m-chrzan.xyz>2024-01-30 21:49:35 +0100
commita1ca483981ae3eda75bcea26921aab8f686d3795 (patch)
treec0d0f0f08e533bb00d96dcbf00baf9837df3a6e3
parent8c533e07efe4180bfadaddcf749c0b5ff5825023 (diff)
Add apt package removal instructions
-rw-r--r--apt.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/apt.md b/apt.md
index 92392f0..d5fa1d9 100644
--- a/apt.md
+++ b/apt.md
@@ -3,3 +3,24 @@
## 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>