From: Dmitry Fedotov Date: Sat, 17 Aug 2024 12:48:15 +0000 (+0300) Subject: Add apt page. X-Git-Url: https://www.git.dmfe.net/?a=commitdiff_plain;h=d0e47bcde7b69dfbf0ace4c69f7c57148832ab31;p=dmfe-website Add apt page. --- 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 +``` +