You can learn more by reading the apt-get and apt manual pages. It does not capture all possible uses of apt-get, plus there are a number of other utilities provided in the APT suite, such as apt-cache for examining information about installed and available packages. To deleted cached package installer files, but only for packages that are unlikely to be needed again (i.e., those that are so old they've been removed from the servers, as of last time sudo apt-get update was run): sudo apt-get autoclean deb) files (which does not remove any packages, but will make it so they have to be fetched over the network again to be reinstalled): sudo apt-get clean To reinstall a package and delete its systemwide configuration files while doing so: sudo apt-get -purge -reinstall install. To reinstall a package, run: sudo apt-get -reinstall install. To do that, and also remove their global configuration files" sudo apt-get -purge autoremove To remove packages that were installed automatically because other packages needed them, but which now are no longer needed, run: sudo apt-get autoremove To remove a package and also remove its systemwide configuration files (but not its per-user configuration files, which reside in users' home directories), run: sudo apt-get purge. To remove one or more packages (i.e., to uninstall it), run: sudo apt-get remove. with the list of packages you want to install (if you want to install more than one package, put spaces between the package names): sudo apt-get install. To install one or more packages, run this, replacing. To upgrade packages, including packages that require uninstalled packages to be installed, or installed packages to be removed, run this (but be careful-it's best to pay attention to what will be added or removed): sudo apt-get dist-upgrade To upgrade packages (i.e., "update your system"), run: sudo apt-get upgrade To update information about what packages are available and from where (which you should do before attempting to upgrade or install any packages with apt-get), run: sudo apt-get update That's what you should probably be using. The most commonly used APT command is apt-get. See Fsando's answer forĪPT is a suite of utilities, including a database of information about what packages are available from where.ĪPT is not a single command. Not support all the same actions and options as apt-get, it may often be used in place of apt-get. Various other apt- commands (e.g., apt-get, apt-cache), withĬolorized display and progress bars. All these things happen in the backend within a. TheĪpt command provides a convenient subset of the functionality of apt update and apt upgrade commands in a single line: sudo apt update & sudo apt upgrade. If you don’t use the update command, you won’t refresh the cache, which would not give you a clue about the available package updates.Starting in Ubuntu 14.04, there is a command in Ubuntu called justĪpt, which didn't exist when this question was originally asked. The metadata includes information pertaining to the version, repository, dependency, and other relevant package details. Your Linux system has an available cache of software (packages), which contains the necessary metadata related to those packages. On the other hand, the apt upgrade command downloads and installs available updates on your machine in one go. The update command gives you an idea about the available updates, but it does not download or install the updates within your distro. apt upgrade: A ComparisonĮven though the apt update command might seem like the obvious go-to option to update your packages on Linux, it’s not entirely the case. But the point is, what's the difference between these commands, and how can you use them to update your Linux packages? apt update vs. When looking for ways to update packages, you will come across commands like apt update, apt upgrade, and related versions.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |