Manjaro Difference between revisions of "Pacman Overview"

Difference between revisions of "Pacman Overview"

From Manjaro
imported>Verityproductions
imported>Verityproductions
Line 20: Line 20:


  sudo pacman -Ss [software package name]
  sudo pacman -Ss [software package name]


For example, to search the repositories to see if a text editor called Leafpad is available, the following command would be entered:
For example, to search the repositories to see if a text editor called Leafpad is available, the following command would be entered:
Line 31: Line 32:


  sudo pacman -S [software package name]
  sudo pacman -S [software package name]


For example, to download and install leafpad, the following command would be entered:
For example, to download and install leafpad, the following command would be entered:
Line 44: Line 46:


  sudo pacman -R [software package name]
  sudo pacman -R [software package name]


For example, to remove the software application Leafpad, the following command would be entered:
For example, to remove the software application Leafpad, the following command would be entered:
Line 49: Line 52:
  sudo pacman -R leafpad
  sudo pacman -R leafpad


However, it is also possible to remove both the package and any other related packages (called dependencies) with the following command:


  sudo pacman -R --nosave --recursive [software package name]
It is also possible to remove package and its dependencies, provided those dependencies are not being used by any other packages. Deleting dependencies exclusive to a certain package is wise, as once the main package is removed, they will become ''orphans'', serving no other purpose than to clutter up your system. To do so, enter the following command:
 
  sudo pacman -Rs [software package name]


This will remove the dependencies provided they:


* are not required by any other package.
However, Pacman usually also creates backup configuration files when deleting packages. As such, for a more thorough (and cleaner) removal (ie. the package, its dependencies, and any configuration files usually generated by pacman) enter the following command:
* were not explicitly installed (i.e. they were not installed separately, but were downloaded automatically as dependencies by pacman when the software package to be removed was installed itself).


This command will also remove the appropriate configuration files used by the deleted package. Using this command will therefore result in a clean system, free of useless dependencies that aren't used by any other software packages (known as ''orphans'').
sudo pacman -Rns





Revision as of 21:45, 7 October 2012

Overview

Pacman is a package manager developed specifically for use in Arch Linux. It is used to install, upgrade, configure and remove software (i.e. to manage software packages). Pacman is used through typing commands terminal; all the commands listed below to undertake various tasks assume that you have your terminal open.

[information required about keyring and signatures]


Updating the System

Tip
This should be the first thing you do after installing Manjaro!

To update your system, enter the following command in the terminal:

sudo pacman -Syu


Searching for Software

It is also possible to use pacman to search Manjaro's software repositories for any desired software, provided you know the name of what you want. To search for a software package, the basic syntax is:

sudo pacman -Ss [software package name]


For example, to search the repositories to see if a text editor called Leafpad is available, the following command would be entered:

sudo pacman -Ss leafpad


Installing Applications and Software Packages

To install a software package, the basic syntax is:

sudo pacman -S [software package name]


For example, to download and install leafpad, the following command would be entered:

sudo pacman -S leafpad



Tip
many software packages (especially complex applications) will require other software packages - known as dependencies - to also be downloaded and installed in order to work. Fortunately, pacman will automatically detect and install these for you.


Removing Applications and Software Packages

To remove a software package, the basic syntax is:

sudo pacman -R [software package name]


For example, to remove the software application Leafpad, the following command would be entered:

sudo pacman -R leafpad


It is also possible to remove package and its dependencies, provided those dependencies are not being used by any other packages. Deleting dependencies exclusive to a certain package is wise, as once the main package is removed, they will become orphans, serving no other purpose than to clutter up your system. To do so, enter the following command:

sudo pacman -Rs [software package name]


However, Pacman usually also creates backup configuration files when deleting packages. As such, for a more thorough (and cleaner) removal (ie. the package, its dependencies, and any configuration files usually generated by pacman) enter the following command:

sudo pacman -Rns


Learning pacman's options

It is a very good idea to become familiar with the varied and powerful uses of pacman. A comprehensive list of options that can be used with pacman can be found by entering the following command:

man pacman

To exit out of the list, simply press q.


Troubleshooting

A separate page for pacman troubleshooting is available here.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.