An interesting and detailed howto on apt, first posted on linux mint community tutorials
Intro by Wikipedia:
The Advanced Packaging Tool, or APT, is a free user interface that works with core libraries to handle the installation and removal of software on the Debian GNU/Linux distribution and its variants. APT simplifies the process of managing software on Unix-like computer systems by automating the retrieval, configuration and installation of software packages.
– WHAT YOU NEED TO KNOW –
- how to open a terminal;
- your root password;
- what is a repository;
- how to connect your computer to the internet.
sudo” command will be followed by a password request. Remember that when you type a password in terminal, you see nothing on screen.
sudo apt-get myspecificcommand
– TO ADD A REPO –
ppa:tualatrix/ppa. To add it to your sources, open a terminal and write this string.
sudo add-apt-repository ppa:tualatrix/ppa
sudo add-apt-repository ppa:your-repo/ppa
– TO UPDATE SOFTWARE LIST –
sudo apt-get update
upgrade“. Please be aware that the overall progress meter will be incorrect as the size of the package files cannot be known in advance.
– TO UPGRADE ALL YOUR SOFTWARE –
sudo apt-get upgrade
upgradeis used to install the newest versions of all packages currently installed on the system from the sources enumerated in /etc/apt/sources.list. Packages currently installed with new versions available are retrieved and upgraded; under no circumstances are currently installed packages removed, or packages not already installed retrieved and installed. New versions of currently installed packages that cannot be upgraded without changing the install status of another package will be left at their current version. An update must be performed first so that
apt-getknows that new versions of packages are available.
– TO FIND THE REAL NAME OF A SOFTWARE –
apt-cache search mysoftware
– TO INSTALL A SOFTWARE –
sudo apt-get install mysoftware
sudo apt-get install mysoftware-1 mysoftware-2 mysoftware-3
– TO UNINSTALL A SOFTWARE –
Basic command is
sudo apt-get remove mysoftware
– TO PURGE A SOFTWARE –
sudo apt-get purge mysoftware
– SPRING CLEANING –
clean” clears out the local repository of retrieved package files. It removes everything but the lock file from /var/cache/apt/archives/ and /var/cache/apt/archives/partial/.
autoclean” clears out the local repository of retrieved package files. The difference is that it only removes package files that can no longer be downloaded, and are largely useless. This allows a cache to be maintained over a long period without it growing out of control.
autoremove” is used to remove packages that were automatically installed to satisfy dependencies for some package and that are no more needed.
sudo apt-get autoclean && sudo apt-get autoremove
– TO CALL A COW –
– MAIN REFERENCE –