If you have libpamac installed on your system, then you should also have the pamac-cleancache.timer service active, and that should regularly clean the pacman cache:
❯ systemctl status pamac-cleancache.timer
● pamac-cleancache.timer - Monthly clean packages cache
Loaded: loaded (/usr/lib/systemd/system/pamac-cleancache.timer; enabled; preset: disabled)
Active: active (waiting) since Fri 2026-07-31 18:17:43 AEST; 2h 21min ago
Invocation: bddbc030b1cc42d89dfbabfa2c62448d
Trigger: Sat 2026-08-01 15:00:00 AEST; 18h left
Triggers: ● pamac-cleancache.service
Jul 31 18:17:43 scott-ser systemd[1]: Started Monthly clean packages cache.
The timer launches the pamac-cleancache.service, which runs the pamac clean --no-confirm command:
❯ grep -i exec /usr/lib/systemd/system/pamac-cleancache.service
ExecStart=/usr/bin/pamac clean --no-confirm
The pamac clean command follows the KeepNumPackages = setting in /etc/pamac.conf. For example, mine is set to keep the last 3 versions of each package:
❯ grep -i keep /etc/pamac.conf
## Keep built packages from AUR in cache after installation:
#KeepBuiltPkgs
## Number of versions of each package to keep when cleaning the packages cache:
KeepNumPackages = 3
So, for automated cleaning of your packages cache you should ensure that the pamac-cleancache.timer is active. You can also run the service manually at any time with the following command:
systemctl start pamac-cleancache
You can check if it worked successfully by running systemctl status pamac-cleancache:
❯ systemctl status pamac-cleancache
○ pamac-cleancache.service - Clean packages cache
Loaded: loaded (/usr/lib/systemd/system/pamac-cleancache.service; static)
Active: inactive (dead) since Fri 2026-07-31 20:48:58 AEST; 15s ago
Invocation: b7c49143020444abab50cfe1baa0f3ab
TriggeredBy: ● pamac-cleancache.timer
Process: 299809 ExecStart=/usr/bin/pamac clean --no-confirm (code=exited, status=0/SUCCESS)
Main PID: 299809 (code=exited, status=0/SUCCESS)
Mem peak: 16.4M
CPU: 114ms
Jul 31 20:48:58 scott-ser systemd[1]: Starting Clean packages cache...
Jul 31 20:48:58 scott-ser pamac[299809]: Number of versions of each package to keep in the cache: 3
Jul 31 20:48:58 scott-ser pamac[299809]: To delete: 0 files
Jul 31 20:48:58 scott-ser systemd[1]: pamac-cleancache.service: Deactivated successfully.
Jul 31 20:48:58 scott-ser systemd[1]: Finished Clean packages cache.
You can also use the paccache command, which is included in the pacman-contribpackage, to clean your pacman cache:
paccache --help
❯ paccache --help
paccache v1.13.1
Flexible pacman cache cleaning utility.
Usage: paccache <operation> [options] [target ...]
Operations:
-d, --dryrun perform a dry run, only finding candidate packages
-m, --move <dir> move candidate packages to "dir"
-r, --remove remove candidate packages
Options:
-a, --arch <arch> scan for "arch" (default: all architectures)
-c, --cachedir <dir> scan "dir" for packages. can be used more than once
(default: read from /etc/pacman.conf)
-f, --force apply force to mv(1) and rm(1) operations
-h, --help display this help message and exit
-i, --ignore <pkgs> ignore "pkgs", comma-separated. Alternatively, specify
"-" to read package names from stdin, newline-
delimited
-k, --keep <num> keep "num" of each package in the cache (default: 3)
--min-atime <time>
--min-mtime <time> keep packages with an atime/mtime that is not older
than the time given, even if this means keeping more
than specified through the '--keep' option. Accepts
arguments according to 'info "Date input formats"',
e.g. '30 days ago'
--nocolor do not colorize output
-z, --null use null delimiters for candidate names (only with -v
and -vv)
-q, --quiet minimize output
-u, --uninstalled target uninstalled packages
-v, --verbose increase verbosity. specify up to 3 times
-V, --version display version information and exit
For example, I regularly remove all cached versions of packages which are no longer installed on my system:
❯ sudo paccache -rvuk0
[sudo] password for scotty:
removed '/var/cache/pacman/pkg/qt6ct-0.11-7-x86_64.pkg.tar.zst'
removed '/var/cache/pacman/pkg/qt6ct-0.11-7-x86_64.pkg.tar.zst.sig'
removed '/var/cache/pacman/pkg/libmaa-1.5.1-1-x86_64.pkg.tar.zst'
removed '/var/cache/pacman/pkg/libmaa-1.5.1-1-x86_64.pkg.tar.zst.sig'
removed '/var/cache/pacman/pkg/libcbor-0.14.0-1-x86_64.pkg.tar.zst'
removed '/var/cache/pacman/pkg/libcbor-0.14.0-1-x86_64.pkg.tar.zst.sig'
removed '/var/cache/pacman/pkg/sequoia-sqv-1.5.0-1-x86_64.pkg.tar.zst'
removed '/var/cache/pacman/pkg/sequoia-sqv-1.5.0-1-x86_64.pkg.tar.zst.sig'
removed '/var/cache/pacman/pkg/qt5ct-1.9-2-x86_64.pkg.tar.zst'
removed '/var/cache/pacman/pkg/qt5ct-1.9-2-x86_64.pkg.tar.zst.sig'
removed '/var/cache/pacman/pkg/nettle3-3.10.2-2-x86_64.pkg.tar.zst'
removed '/var/cache/pacman/pkg/nettle3-3.10.2-2-x86_64.pkg.tar.zst.sig'
removed '/var/cache/pacman/pkg/litehtml0.9-0.9-2-x86_64.pkg.tar.zst'
removed '/var/cache/pacman/pkg/litehtml0.9-0.9-2-x86_64.pkg.tar.zst.sig'
removed '/var/cache/pacman/pkg/libjcat-0.2.6-1-x86_64.pkg.tar.zst'
removed '/var/cache/pacman/pkg/libjcat-0.2.6-1-x86_64.pkg.tar.zst.sig'
removed '/var/cache/pacman/pkg/dictd-1.13.3-1-x86_64.pkg.tar.zst'
removed '/var/cache/pacman/pkg/dictd-1.13.3-1-x86_64.pkg.tar.zst.sig'
==> finished: 9 packages removed (disk space saved: 2.41 MiB)