Skip to content

pacman --clean can't remove temporary directories created by yay #2737

@wormingdead

Description

@wormingdead

Affected Version

yay v12.5.7 - libalpm v16.0.1

Describe the bug

yay seems to be creating temporary cache directories that pacman can't remove with --clean.

Reproduction Steps

  1. Install an AUR package with yay
  2. Run yes | yay -Scc
  3. error: could not remove /var/cache/pacman/pkg/download-GKSjZK: Is a directory

Expected behavior

Pacman cache directories are emptied.

Output

[worm ~]$ yes | yay -Scc

Cache directory: /var/cache/pacman/pkg/
:: Do you want to remove ALL files from cache? [y/N] y
removing all files from cache...

Database directory: /var/lib/pacman/
:: Do you want to remove unused repositories? [Y/n] y
removing unused sync repositories...

Build directory: /home/worm/.cache/yay
:: Do you want to remove ALL AUR packages from cache? [Y/n] removing AUR packages from cache...
[worm ~]$ yay -Sq yay
AUR Explicit (1): yay-12.5.7-1

[...]

[worm ~]$ yes | yay -Scc

Cache directory: /var/cache/pacman/pkg/
:: Do you want to remove ALL files from cache? [y/N] y
removing all files from cache...
error: could not remove /var/cache/pacman/pkg/download-GKSjZK: Is a directory

Database directory: /var/lib/pacman/
:: Do you want to remove unused repositories? [Y/n] y
removing unused sync repositories...
 -> exit status 255
[worm ~]$

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions