Apt. Get/Howto - Community Help Wiki This article applies to all supported versions of Ubuntu Package management via apt- get runs hand- in- hand with the /etc/apt/sources. Introduction. This page describes how to handle the packages on your system using apt- get and related commands. For example, you can install a new package, remove an installed package, or update all installed packages to the latest versions. Commands All these commands except the search commands must be run as root or with superuser privileges, see sudo for more information. Remove packages autoremove - Remove automatically all unused packages purge - Remove packages and. Debian Linux however includes a command called apt-get that can automatically download and install packages from a repository run by the distribution. The Software Packages module main page. If the package is not in the repositories it will return an error. Aptitude can be used from the command line in a similar way to apt- get. Enter man aptitude for more information. APT and aptitude will accept multiple package names as a space delimited list. For example: apt- get install < package. However when I uninstalled Firefox it didn't uninstall unrequired dependancies. How to remove unused packages Okay I'll give that a try. Should I use “apt-get remove” or “apt-get purge”? If a program tries to access a file known to belong in an uninstalled package, auto- apt will install that package using apt- get. This is achieved by calling the commands auto- apt update, auto- apt updatedb and auto- apt update- local. Usage example You're compiling a program and, all of a sudden, there's an error because it needs a file you don't have. The program auto- apt asks you to install packages if they're needed, stopping the relevant process and continuing once the package is installed. If you're running X, a graphical interface will replace the default text interface. I understand that apt-get remove removes packages and apt-get autoremove is to remove any packages that were installed to fulfil a dependency for. When would you use apt-get remove over apt-get autoremove? Tech Tip: Removing Unnecessary Packages on Debian Systems. Maintenance commandsapt- get update Run this command after changing /etc/apt/sources. For information regarding /etc/apt/preferences, see Pinning. Howto. Run this command periodically to make sure your source list is up- to- date. It does an update of the package lists and checks for broken dependencies. This command does the same thing as Edit- > Fix Broken Packages in Synaptic. Do this if you get complaints about packages with . With many packages, you’ll be prompted with some configuration questions you may not have known were there. For example: dpkg- reconfigure fontconfig- config will present you with a . The note above about sudo usage applies to this command. Removal commandsapt- get remove < package. Configuration files residing in ~ are not usually affected by this command.+ operator If you want to remove package. This command removes packages that were installed by other packages and are no longer needed. This command lists packages whose name or description contains < search. Note that foo. deb is a pathname. Consider this to be a . In order to use this command, the package dlocate must be installed on your system. It is slower than dlocate but has the advantage of being installed by default on all Debian and Ubuntu systems. It answers the question, . Use the command: apt- file update In order to use this command, the package apt- file must be installed on your system. So let's install a racing game. But is this game not already installed on my computer? And what is the available version? Which repository is it from (Universe or Main)? In this example, it's straightforward (. One way of finding the name of the binary is to look at what files the package has installed in . For administrative programs, it's in . With the second part, we ask to only display lines containing . Hmmm, that game is cool. Maybe there are some extra tracks? I will delete the apt cache! But I want to keep the configuration files so I can simply re- install it later. Temporary proxy session. This is a temporary method that you can manually use each time you want to use apt- get through a http- proxy. This method is useful if you only want to temporarily use a http- proxy. Enter this line in the terminal prior to using apt- get (substitute your details for yourproxyaddress and proxyport). This method is useful if you only want apt- get (and not other applications) to use a http- proxy permanently. Acquire: :http: :Proxy . BASH rc method. This method adds a two lines to your . HOME directory. This method is useful if you would like apt- get and other applications for instance wget, to use a http- proxy. Close your terminal window and then open another terminal window or source the ~/. Test your proxy with sudo apt- get update and whatever networking tool you desire. If you make a mistake and go back to edit the file again, you can close the terminal and reopen it or you can source ~/.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2016
Categories |