A Brief But Accurate Documentation, BSD Linux And Programming

 Docker

Friday, March 10, 2017

Use Pacman Overview

#Searching for Software Packages

pacman -Ss [software package name]

example

pacman -Ss gnome


#Searching Your System

pacman -Qs [software package name]

to get a much more comprehensive package is installed

pacman -Qi [software package name]

It is also possible to obtain more information, including files related to backup and the date that the package was last modified

pacman -Qii [software package name]

for a list of all installed packages on your system

pacman -Ql

#Dependencies
To list all dependencies of a particular software package

pactree [software package name]

#Orphans
To list all orphans - that is, installed packages that are not used by anything else and that consequently serve no purpose

pacman -Qdt

It is highly recommended to remove orphans from your system, as although harmless, they still serve no purpose other than to take up room and resources. Rather than having to remove them one-by-one

sudo pacman -Rs $(pacman -Qdtq)

install software packages

sudo pacman -S [software package name]

example

sudo pacman -S gedit

It is also possible to download software packages without actually installing them

sudo pacman -Sw [software package name]


#Packages from the AUR (Arch User Repository)
To install a package from the AUR using a wrapper for pacman like yaourt-

search all keyword

yaourt firefox

directly install

yaourt firefox-developer

#Packages Located Locally or From the Internet
To install a package already downloaded onto your system (the file name should end in pkg.tar.xz)

sudo pacman -U [/package_path/][software package name.pkg.tar.xz]

example

sudo pacman -U ~/Downloads/[software package name.pkg.tar.xz]

To install a package via a URL (i.e. located elsewhere on the internet)

pacman -U http://www.examplepackage/repo/examplepkg.tar.xz

#Removing Applications and Software Packages
To remove a software package

sudo pacman -R [software package name]

example

sudo pacman -R gedit

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

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)

sudo pacman -Rns [software package name]

example

sudo pacman -Rns gnome

#Cleaning the Cache

Your system cache is where downloaded software packages are stored for installation. Even after being installed, they may still remain in the cache. This is why on occasion it may be found that when re-installing a software package, it does not have to be downloaded again. However, it is possible to clear your cache to free up space on your system (and may be necessary in some rare instances to download and install new software packages).

clear the cache of downloads that have already been installed

sudo pacman -Sc

Otherwise, to clear the cache completely

sudo pacman -Scc

#Holding Back Packages from being Upgraded

Pacman's settings are located in /etc/pacman.conf

gksu gedit /etc/pacman.conf

add package

IgnorePkg=package-name

add group name example gnome

IgnoreGroup=gnome

#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

man pacman

exit (q)

No comments:

Post a Comment

Back to top