A few useful pacman commands.

Pacman

Here’s a few useful commands that you can use with pacman on arch Linux..


Search for package….

You can use this command to search for a package. Just replace $packagename with your package name.

pacman -Ss $packagename

Update system….

Use this command to update the system.

pacman -Syu

Update database….

This command can be used to update the database.

pacman -Syy

Install a local package….

Installing a package saved locally is as simple as running this command.

pacman -U $packagename

Install a package….

To install a package from within the arch repos, just run this command.

pacman -S $packagename

Remove a package….

To remove only a package & nothing else, run this command.

pacman -R $packagename

Completely remove package….

This command will remove a package & all other files relating to said package. Please note that anything in your home directory will need to be removed manually.

pacman -Rsn $packagename

Remove package & any dependencies that aren’t needed by another app….

Run this command to remove a package & also any dependencies that are not needed by any other package.

pacman -Rs $packagename

List unneeded dependencies….

List all dependencies that are installed, but not required by any package.

pacman -Qdt $packagename

Remove all unneeded / unused dependencies….

Like the above command this will list all dependencies that are installed, but will also remove them at the same time.

pacman -Rsn $(pacman -Qdtq)

Related posts

Four useful ffmpeg commands.

In this blog post I’m listing four ffmpeg commands that I use more than any other. ffmpeg -i /home/furycd001/Downloads/video.mp4 /home/furycd001/Downloads/image_%04d.png…