0% found this document useful (0 votes)
251 views11 pages

Manjaro User Guide

1. The document discusses various ways to manage software packages in Manjaro Linux using the Pacman package manager, including commands to update package lists, search for packages, install packages, remove packages, and update mirrors. 2. It provides specific commands like "sudo pacman -Syyu" to synchronize package lists, "sudo pacman -Ss leafpad" to search for a package, and "sudo pacman -mirrors -f 0" to automatically select mirrors for package downloads. 3. It also discusses how to manage software packages and update mirrors using the graphical Pamac package manager interface, such as selecting mirror locations and refreshing them from the Preferences window.

Uploaded by

Gina López
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
251 views11 pages

Manjaro User Guide

1. The document discusses various ways to manage software packages in Manjaro Linux using the Pacman package manager, including commands to update package lists, search for packages, install packages, remove packages, and update mirrors. 2. It provides specific commands like "sudo pacman -Syyu" to synchronize package lists, "sudo pacman -Ss leafpad" to search for a package, and "sudo pacman -mirrors -f 0" to automatically select mirrors for package downloads. 3. It also discusses how to manage software packages and update mirrors using the graphical Pamac package manager interface, such as selecting mirror locations and refreshing them from the Preferences window.

Uploaded by

Gina López
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

120 manjaro linux

Octopi
Note : The windows decorations displayed in the following subsection may
differ from the ones currently used. It does not affect the methods shown.
The process of installing new software using Octopi is very similar
to the one using Pamac.

9: Octopi allows easy access


to the available software. Do
note that the search process
is slightly different to Pamac
as you can select whether to
search by package name or
package description. Once
you’ve found the package you
want to install, right-click and
select Install.

10: Some software will have


other packages it can optionally
use if they are installed. These
“optional dependencies” can be
selected here or ignored - you
can always install them later if
you want to!
user guide 121

11: A summary of the transac-


tions is displayed at the bottom
of the window. Once you are
ready to apply them, click on
the checkmark at the top-left of
the window to Commit them.

12: The packages to be installed


are listed so you can check if
this is what you want to do.
When you are happy with the
selection, click Yes, type in the
root (administrator) password
when prompted and the soft-
ware will be downloaded and
installed.
122 manjaro linux

13: Octopi will show a con-


firmation that it installed the
new software. You can close
Octopi now if you want. The
new software is now ready to
use!

Using Pacman

Pacman is the Arch Linux package manager. This underpins Pamac


and Octopi but doesn’t have a graphical interface. Instead, it is used
by typing commands on the terminal. The commands allow you to
install, upgrade, configure, and remove software.

Synchronising with the Manjaro repositories


As new packages are added to the repositories you will need to reg-
ularly synchronise the package lists. This is normally taken care of
automatically on a regular basis by the software managers, but to
perform this manually type the following into the terminal:
sudo pacman -Sy

This will only download the package lists if there has been a change.
Occasionally you may want to force the package lists to be down-
loaded. To do this, type:
sudo pacman -Syy

Updating software
Pacman will allow you to perform an update of software already
installed with the command:
sudo pacman -Su

It’s a good idea to check whether the package lists are up-to-date at
the same time. To do so, type:
sudo pacman -Syu
user guide 123

You can also force a package list synchronisation before performing


an update with:

sudo pacman -Syyu

Searching for software

Finding a package by name is really straightforward. For example, to


search for a text editor called Leafpad, type: 1: sudo pacman -Syyu

sudo pacman -Ss leafpad

Installing software

Installing a package is equally straightforward. For example, to in-


stall Leafpad, type: Many software applications depend on
other software packages. Thankfully,
sudo pacman -S leafpad Pacman will automatically detect and
install these!

Removing software

To remove a software package you need to know its name, but the
command is straightforward. To remove Leafpad, type:

sudo pacman -R leafpad

It’s also possible to remove a package and any dependencies it re-


quired when it was installed. Assuming those other packages are not
being used by another piece of software, they will become orphan
packages. These serve no function other than taking up space! To
remove a software package with its dependencies, type:

sudo pacman -Rs leafpad

A package may also create configuration files. Normally these are


left in place so your configuration is not lost, and can be reused if
you install the package again. However, if you want to remove these
configuration files too, the command is:

sudo pacman -Rns leafpad

If at a later date you want to remove all orphan packages and con-
figuration files for packages that you removed some time ago, the
following command will do it:

sudo pacman -Rns $(pacman -Qtdq)

Be warned, though: this is an advanced command!


124 manjaro linux

Other Pacman commands


It’s a good idea to become familiar with the Pacman commands. It
can be a very useful tool in case the other software managers refuse
to complete an installation, for example if an installation process is
interrupted. The Pacman manpage is very informational and can be man is short for manual
viewed with the command:
man pacman

To exit, press q.

Updating the mirror list

Manjaro Linux packages are hosted on a number of servers across the


world; these servers mirror the official Manjaro software repository.
When you first install Manjaro it will try to work out which server
is closest to you so that software downloads complete as quickly as
possible.
Sometimes, though, the list of mirrors can get old. New mirrors
can become available, and some mirrors are removed. Updates to
Manjaro will regularly trigger an update of the mirror list, but some-
times it’s useful to do this manually.
To update the mirror list use the following command:

sudo pacman-mirrors -f 0

This will test the speed of all currently available mirrors and set your
machine to use the best for you. Once this command has completed, 2: sudo pacman-mirrors -f 0
you should force a download of the package lists with the command:
sudo pacman -Syyu

Choosing mirrors
If you would like more control over which mirrors to use, run the
command:

sudo pacman-mirrors -i

This will allow you to select which mirror, or mirrors, to try when
checking for software updates and downloading new packages. It’s 3: sudo pacman-mirrors -i
normally best to choose mirrors that are geographically close to you,
so if you’re in Canada then servers from Canada and the US are
generally a good bet. Of course, you’re free to choose whichever you
want!
To reset back to an automatic choice, run this command:
sudo pacman-mirrors -f
user guide 125

Remember to force a download of the package lists to use the new


mirrors!

Updating mirrors from Pamac

Mirrors can also be refreshed from within Pamac. There you can
select the country from which to choose the mirrors. Choosing your
country or one close to yours is generally a good idea.

4: From Pamac, click the dots


menu at the top right of the
window and select Preferences.
You will be prompted for your
password.

5: In the window that pops up,


go to the Official Repositories
tab. There, you will be able
to choose the location of the
mirrors and refresh them.
126 manjaro linux

Switching branches
When you install Manjaro, unless you specifically installed a preview
version, you will be using the stable branch. This set of packages has
the most testing and so is the best for most users. However, you may
want to help test packages before they move to the stable repository.
To do this, you can switch to the testing branch with the command:

sudo pacman-mirrors -f -a -B testing

The testing repository has packages that have been checked by the
Manjaro development team to make sure they work correctly. How-
ever, the amount of testing done is much smaller than for the stable
branch - but this is how they get tested!
If you want to live on the bleeding edge, you can switch to the
unstable branch. This is normally used by the Manjaro developers.
Packages from the unstable branch can cause problems, so this is not
something to do lightly. If you ever decide to try it out, the command
is:

sudo pacman-mirrors -f -a -B unstable

After switching branches you will need to force an update of the


package lists and packages, which can be done with the command:

sudo pacman -Syyu

If you switch away from the stable branch, but want to move back,
it’s actually pretty easy. You can switch back to the stable branch in
the same way you left it, with the command:

sudo pacman-mirrors -f -a -B stable

This will leave the newer packages on your system and these will be
replaced as the stable branch catches up. However, if you want to
force a downgrade of packages back to the stable version, use:

sudo pacman -Syyuu

Fixing installation errors

Occasionally, an installation can go wrong. The downloaded file


might be corrupted, or the process might be interrupted if you lose
power. Most of the time it’s relatively easy to get your system back to
a working state!
The most common error you will be something like:

:: Synchronising package databases...


error: failed to update core (unable to lock database)
error: failed to update extra (unable to lock database)
user guide 127

error: failed to update community (unable to lock database)


error: failed to update multilib (unable to lock database)
error: failed to synchronise any databases
error: failed to init transaction (unable to lock database)
error: could not lock database: File exists
if you’re sure a package manager is not already running,
you can remove /var/lib/pacman/db.lck

This means Pacman thinks it is already running. If it is, and you try
to force an installation or removal of software, the package database
can be left in an inconsistent state. This would be bad. So, the first
thing to check is whether an installer is running. One of the easiest
ways to check is to run a terminal command:
ps x | grep pacman

This might look complicated, but it’s just two small commands joined
(piped) together. First,
ps x

produces a list of running processes for all users. Second,


grep pacman

searches for the text “pacman”. The pipe, |, takes the output from
the first and feeds it to the second. To check whether another pro-
gram is running you can just change the text “pacman” to something
else:
ps x | grep pamac
ps x | grep octopi

Once you are sure an installer is not running, you can delete Pac-
man’s lock file with the command:
sudo rm /var/lib/pacman/db.lck

Then try running the install process again!


If a problem persists, there is a series of commands that will fix
most issues:
sudo rm -f /var/lib/pacman/db.lck
sudo pacman-mirrors -g
sudo pacman -Syyuu
sudo pacman -Suu

In order, these commands:


• Remove Pacman’s lock file;

• Update the mirror list;

• Forces an update of the package lists and an update of any pack-


ages to bring them in line with the current repository state;

• Ensures no packages are left out of line with the current repository
state.
128 manjaro linux

More information

Remember - there is plenty of information on the wiki https://


wiki.manjaro.org/ and discussion forum https://forum.manjaro.
org/. Do not hesitate to use them!
Index

Add/Remove Software, 102 Forum, 104 Pacman, 122


Adding a printer, 109 Pacman-mirrors, 124
Assisted installation, 53 Help, 103 Pamac, 114
Partition, 39
BIOS, 39, 53, 61 Installing new software, 117 Partition table, 39
Boot loader, 39 Introduction, 11 Printer, 109
Branches, 126 IRC, 105
Burning to a CD/DVD, 23 Settings, 107
Licence, documentation, 4
Switching branches, 126
Live environment, 31
Desktop, 97
Downloading, 15
Mail Reader, 101 Terminal Emulator, 100
Mailing list, 106
Editions, 15 Maintaining your system, 107
errors, Checking for, 19 UEFI, 39, 53, 73
Manjaro Development Team, The, 5
Updating software, 114
Manual installation, 61, 73
USB flash drive, 26
Favourites, 98 Microsoft Windows 10, 43
Features, 11 Mirror, 124
File Manager, 100 Mount point, 39 Web Browser, 101
File system, 39 Wiki, 106
Fixing installation errors, 126 Octopi, 115 Writing a disc image, 23

You might also like