MX on Linux: Difference between revisions

1,639 bytes added ,  07:29, 13 April 2022
m
Line 171: Line 171:
!style="width:30px" | Instruction following “apt”
!style="width:30px" | Instruction following “apt”
!style="width:600px" | Description
!style="width:600px" | Description
|-
! scope="row"|update
| The "source list" [[#The various components to commands for installation|mentioned earlier]] that references the repositories from which software packages can be installed, needs to be updated periodically so it reflects any changes within those repositories. The instruction "update" is included after "apt" to make sure your computer has up to date information about repositories installed, and to report if these contain packages that can be upgraded.
In [[#Interactive Package management on RPi]] there was mention of the need to select "Update" item in menu first, and again in terminal mode, it is necessary to do this action before you do either of the next two actions.
|-
|-
! scope="row"|install
! scope="row"|install
|To install a package and its dependencies
|To upgrade or install a particular package, and its dependencies. It is mandatory to include further parts of the command after "install", see below this table.
|-
 
! scope="row"|update
If a later part of the command includes a package name, then this action applies to the mandatory dependencies, it does not mean all components are installed; but if a later part of the command names multiple components, then dependencies of all those components will be actioned.
| The "source list" [[#The various components to commands for installation|mentioned earlier]] that references the repositories from which software packages can be installed, needs to be updated periodically so it reflects any changes within those repositories. The instruction "update" is included after "apt" to make sure your computer has up to date information about repositories installed, and to report if these contain packages that can be upgraded
|-
|-
! scope="row"|upgrade
! scope="row"|upgrade
| Once your "source list" is up to date, <code>sudo apt upgrade</code>, followed by a package name, will for the named packages download any newer versions now available in repositories. If you include <code>-y</code> flag, or you answer 'Y' or 'y' to the prompt, then the package manager will continue, and actually replace those packages that are already installed on your computer with the downloaded newer versions, making them available for immediate use.  (You cannot upgrade the actual kernel within the operating system with this instruction, so there is no necessity to reboot your Linux computer).
| Once your "source list" is up to date, <code>sudo apt upgrade</code>, will actually initiate the download of newer versions now available in repositories.  
 
* Note that it is not mandatory to follow this action with further parameters, but you can:
** If you include <code>-y</code> flag, or you answer 'Y' or 'y' to the prompt, then the package manager will continue, and actually replace those packages that are already installed on your computer with the downloaded newer versions, making them available for immediate use.   
** If you don't specify a package name, the default "upgrade" action will exclude anything that has had a component affected by a manual "remove" action (see below)
** It is also possible to follow the "upgrade" action (and any flag) with one or more package name(s), then the upgrade will only be done for the named packages.  (Does anyone know how to specify with flag, to exclude particular named packages?)
 
(You cannot upgrade the actual kernel within the operating system with this instruction, so there is no necessity to reboot your Linux computer).
|-
|-
! scope="row"|full-upgrade
! scope="row"|full-upgrade
| Once your "source list" is up to date, the instruction "full-upgrade" can be included after "apt". The advantage of "full-upgrade" over the simple "upgrade" is that it picks up dependencies, it ensures that every package is able to work with all other packages, and so normally results in more components being upgraded. (Again, this does not affect kernel, and does not require a computer reboot).
| Once your "source list" is up to date, the action "full-upgrade" can be included after "apt". The advantage of "full-upgrade" over the simple "upgrade" is that it picks up dependencies, it ensures that every package is able to work with all other packages, and so normally results in more components being upgraded. (Again, this does not affect kernel, and does not require a computer reboot).
|-
|-
! scope="row"|autoremove
! scope="row"|autoremove
| The instruction "autoremove" can be included after "apt" to check all components in the packages you have installed onto your computer, and remove any components that are not needed by the dependencies of the packages you are using. A download for software frequently includes some components specifically for their software to work with particular other optional packages, and therefore installs more than you actually need.
| The action "autoremove" can be included after "apt" to check all components in the packages you have installed onto your computer, and remove any components that are not needed by the dependencies of the packages you are using. A download for software frequently includes some components specifically for their software to work with particular other optional packages, and therefore installs more than you actually need.


When we install mono-complete later, the other packages we install do not need every component that has installed, and “autoremove” can be used to tidy up when all our installations are finished.
When we install mono-complete later, the other packages we install do not need every component that mono-complete has installed, and “autoremove” can be used to tidy up when all our installations are finished.
|-
|-
! scope="row"|remove
! scope="row"|remove
|If you want to remove just one component manually, use <code>sudo apt remove</code> followed by the name of component you no longer want
|If you want to remove just one component manually, use <code>sudo apt remove</code> followed by the name of component you no longer want.
 
One advantage of using the "remove" action is that it does not delete any related configuration files, so if we do later decide to install the package again, we don't have to repeat all configuration tasks! As a quick example, PHP is upgraded from time to time, but as an upgrade removes some system functions and adds some new ones, it is possible our existing PHP scripts will stop working if we upgrade PHP. By using the "remove" action, a future "upgrade" action will automatically exclude "php" from its default upgrades.
|-
|-
! scope="row"|purge
! scope="row"|purge
5,838

edits