From d0e47bcde7b69dfbf0ace4c69f7c57148832ab31 Mon Sep 17 00:00:00 2001 From: Dmitry Fedotov Date: Sat, 17 Aug 2024 15:48:15 +0300 Subject: [PATCH] Add apt page. --- docs/unix-linux/utils/apt.md | 47 ++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 docs/unix-linux/utils/apt.md diff --git a/docs/unix-linux/utils/apt.md b/docs/unix-linux/utils/apt.md new file mode 100644 index 0000000..9f312a3 --- /dev/null +++ b/docs/unix-linux/utils/apt.md @@ -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 +``` + -- 2.39.5