1
0
Fork 0
knowledge-base/KB/Linux/Pacman.md

47 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2022-09-04 12:54:22 +00:00
---
creation date: 2022-07-14
tags: [note,pacman,package,packages,hooks,hook]
---
The following hooks are useful
```
pacman-cleanup-hook
pacman-mirrorlist
```
In addition, configure `reflector`(install first) to periodically update mirrorlist in `/etc/xdg/reflector/reflector.conf` with the following contents
```shell
# Reflector configuration file for the systemd service.
#
# Empty lines and lines beginning with "#" are ignored. All other lines should
# contain valid reflector command-line arguments. The lines are parsed with
# Python's shlex modules so standard shell syntax should work. All arguments are
# collected into a single argument list.
#
# See "reflector --help" for details.
# Recommended Options
# Set the output path where the mirrorlist will be saved (--save).
--save /etc/pacman.d/mirrorlist
# Select the transfer protocol (--protocol).
--protocol https
# Select the country (--country).
# Consult the list of available countries with "reflector --list-countries" and
# select the countries nearest to you or the ones that you trust. For example:
--country Germany
# Use only the most recently synchronized mirrors (--latest).
--latest 10
# Sort the mirrors by synchronization time (--sort).
--sort score
2023-04-10 08:30:46 +00:00
```
## Clean up cache
`sudo systemctl enable --now paccache.timer`