]> www.git.dmfe.net Git - dmfe-website/commitdiff
Add apt page.
authorDmitry Fedotov <dm.fe@yandex.ru>
Sat, 17 Aug 2024 12:48:15 +0000 (15:48 +0300)
committerDmitry Fedotov <dm.fe@yandex.ru>
Sat, 17 Aug 2024 12:48:15 +0000 (15:48 +0300)
docs/unix-linux/utils/apt.md [new file with mode: 0644]

diff --git a/docs/unix-linux/utils/apt.md b/docs/unix-linux/utils/apt.md
new file mode 100644 (file)
index 0000000..9f312a3
--- /dev/null
@@ -0,0 +1,47 @@
+---
+tags:
+    - linux
+    - unix
+    - utils
+    - apt
+---
+
+# apt
+
+apt is a command-line tool for working with debian package manager. It stands
+for Advanced Packaging Tool(APT).
+
+## Working with APT examples
+
+```bash title="Install new package"
+$ apt install nvim
+```
+
+```bash title="Remove package"
+$ apt remove nvim
+```
+Adding the `--purge` option to `apt remove` will also removes the package configuration
+files.
+
+
+```bash title="Update the local package index"
+$ apt update
+```
+
+```bash title="Upgrade all packages in system"
+$ apt update
+$ apt upgrade
+```
+
+```bash title="Check apt cache size"
+$ du -sh /var/cache/apt/archives/partial
+```
+
+```bash title="Clean apt cache except blocking file"
+$ apt-get clean
+```
+
+```bash title="Clean apt cache, but it will remove only those packages, which can't be loaded from repositories."
+$ apt-get autoclean
+```
+