====== Package management ====== Although Ubuntu uses deb packages, it has a variety of tools to manage packages. Since 10.04, aptitude was removed leaving apt-get - which is OK but removes task based package selection. Package managers must be run with elevated priviledges: sudo apt-get check This example checks for any problems in currently installed programs. There are several advantages to packages: * Automatic dependancy resolution: Any packages required are automatically downloaded and installed. * Automatic updates: Apt allows for any software installed to be upgraded to newer versions. ===== Installing software ===== The most common use for apt is to install new software: sudo apt-get install packagename Any required dependencies are resolved and you are asked if you wish to proceed. You will also be told if any problems might arise. ===== Removing software ===== To remove a package: sudo apt-get remove packagename If you wish to remove a package and all its dependancies: sudo apt-get autoremove packagename Lastly if you want to remove any configuration files then: sudo apt-get --purge autoremove packagename ===== Install packages by task ===== Install tasksel: sudo apt-get install tasksel Then you can install by task - i.e. to install a [[/ubuntu/lamp|LAMP stack]] sudo tasksel install lamp-server Running tasksel on its own uses a curses interface showing available tasks. ===== Package maintainance ===== You can update your source lists (what software is available) b: sudo apt-get update Available upgradescan be shown by typing: sudo apt-get upgrade Or upgrade the entire distribution using sudo apt-get dist-upgrade To free up disk space by running sudo apt-get autoclean This removes deb packages for uninstalled applications, you can remove them for installed packages using: sudo apt-get clean Lastly, you can reconfigure an installed package by running: sudo dpkg-reconfigure packagename ===== Optimize download ===== You can increase the download speed when using apt in Ubuntu 7.10 by finding the fastest available source. First click on **System>Administration>Software Sources**. From 10.10, this option is hidden and requires that you open **System>Preferences>Main Menu** then tick "Software Sources" Choose Other from the Download From list box then click on the Select Best Server button.