With BlackArch, you can install tools by category.
One category today. And other category the day after.
Until all completely installed.
Or you can install only what you need.
And keep our system clean.
But we are not talking about BlackArch here.
Therefore I must make a more genreci example.
List Group
To show all group, just use --sync --group
Equal to:
Cool! Now we can install a specific group.
I choose base-devel, as we need toolchain later for automatic compilation.
Lock Package
Two method here
IgnorePkg to avoid change, upgrade or downgrade.
HoldPkg to avoid removal.
IgnorePkg
Consider an water creature case here that I installed from outdated repo.
It will always be on the upgradable list.
Unless we explicitly ignore it, by using IgnorePkg
in /etc/pacman.conf.
I have been using this IgnorePkg
to avoid driver upgrade for my SiS671 driver,
because there was about one year that,
the later driver does not work with xorg.
HoldPkg
What if I want this water creature to be always in my system ?
We explicitly hold it, by using HoldPkg
in /etc/pacman.conf.
System Wide
System Wide Information
List Packages
Listing packages handled by package manager,
can be achieved by pacman -Sl.
Note that pacman -Ql has a very different task.
Or
You can query only installed packages.
Search Files
Files owner
Or:
To find package that provide a specific file,
you can utilize pkgfile.
Verify
Verify integrity of package database, such as dependencies and consistency.
Since pacman 5.0, testdb has been replaced.
Equal to:
You can also query check.
/var/lib
You can also examine /var/lib/pacman/local.
History
This is most the forgotten part of package management,
although it is not uncommon to notice messages.
The Log File
There are few log files.
/var/log/pacman.log
less or more is a good tool to read log file.
Most likely you want the tail, latest transaction,
at the bottom of the recorded event.
Note that all package that you use will still in that directory.
You can uninstall manually if you want.
Please preserve system packages such as driver and kernel,
just in case upgrade issue happened.
I personally like to collect important package to other directory,
and remove all package manually.
Autoremove
ALPM has this very nice autoremove feature that is flexible
but not easy to remember for daily basis.
Supposed that I just remove vim,
without removing dependency.
Now we can have this
Consider, not to be noisy this time.
We have array of packages in a row.
Or
Now we can remove recursively.
Equal to:
Case
When chroot fail
Once I had a kernel panic, that caused by filesystem failure,
due to electricity went out.
This wasn’t the only misery, apparently chroot also failed miserably,
with message input/output error, that means I cannot do pacman
to reinstall missing files (mostly library).
This is when pacman -U -r,
this command can have a target directory.
It means we can install in different root location.
After installing glibc from different partition (or live usb),
I can chroot successfully.
Later I can _pacman in chroot to replace some missing library files.
Note that image below does not run on docker,
but real life problem solving.
What’s Next
There are still, some interesting topic for ALPM.
Consider finish reading [ Part Three ].