Apt-get is a little tool that will let you install, remove, update your different softs or typically called system packages. Usually when you want to install a new soft on your Windows for example, you need to download it from a specific website. We are trying to avoid this on Linux. A well-maintained Linux system is the one with softs or packages coming from the same repository saved in a sources.list file on your system.
1 |
/etc/apt/sources.list |
Using this tool has many advantages in compared to manual installs. You can easily check for updates in a single query:
1 |
apt-get update && apt-get upgrade |
When you made changes to a config files, it usually shows you differences and let you make merges between old and new files.
You can easily install a package in a single query:
1 |
apt-get install <my_package_name> |
Or remove it
1 |
apt-get remove <my_package_name> |
If you don’t know the package name, you can make a search query to get them
1 |
apt-cache search <my_keywords> |
The big thing about this tool is that it will automatically deal with dependencies between packages. For example if one package needs another to work correctly, they will all be installed.
If you uninstall a package, their dependencies will stay installed even if they are not used. You could remove old and unused dependencies with this query:
1 |
apt-get autoremove |
If you update a package, the old one will stay. You can easily remove old version packages with this query:
1 |
apt-get autoclean |
Articles like this make life so much smipler.
Thanks dude. I’m trying to make all of them this way :)