Pacman -Scc command not working, unable to manually delete

For months now, I have been receiving this error every time I try to use the command -Scc :

error: could not remove /var/cache/pacman/pkg/download-byOH5d: Is a directory
error: could not remove /var/cache/pacman/pkg/download-ZkcgKu: Is a directory
error: could not remove /var/cache/pacman/pkg/download-hcUUzI: Is a directory
error: could not remove /var/cache/pacman/pkg/download-4udYJD: Is a directory
error: could not remove /var/cache/pacman/pkg/download-uvwPIu: Is a directory
error: could not remove /var/cache/pacman/pkg/download-uyqbJM: Is a directory
error: could not remove /var/cache/pacman/pkg/download-gQfw9u: Is a directory
error: could not remove /var/cache/pacman/pkg/download-ETInkG: Is a directory
error: could not remove /var/cache/pacman/pkg/download-55BcnD: Is a directory
error: could not remove /var/cache/pacman/pkg/download-uY9w5u: Is a directory
error: could not remove /var/cache/pacman/pkg/download-YtlsQu: Is a directory
error: could not remove /var/cache/pacman/pkg/download-wesP5T: Is a directory
error: could not remove /var/cache/pacman/pkg/download-lmn2Wt: Is a directory
error: could not remove /var/cache/pacman/pkg/download-O8gFCT: Is a directory
error: could not remove /var/cache/pacman/pkg/download-iKPAme: Is a directory
error: could not remove /var/cache/pacman/pkg/download-JKT2Y2: Is a directory
error: could not remove /var/cache/pacman/pkg/download-cWwI5a: Is a directory
error: could not remove /var/cache/pacman/pkg/download-iF1Yv4: Is a directory
error: could not remove /var/cache/pacman/pkg/download-K0FFbd: Is a directory
error: could not remove /var/cache/pacman/pkg/download-QALbyg: Is a directory
error: could not remove /var/cache/pacman/pkg/download-vSe6Gn: Is a directory
error: could not remove /var/cache/pacman/pkg/download-NQ9RWv: Is a directory

Using -Sc produces a similar result, only with “Is a directory” replaced with “Error reading fd 7” and “could not remove” replaced with “could not open”.

I have attempted to look online for any sort of solution. Most of what I find says to remove these files manually. However, this is not an option for me. Each of these folders has an orange-yellow lock icon and I am prevented from even opening the folders, let alone deleting them. So any attempts to delete manually fail each time.

Is there anything else I can try aside from reinstalling the OS?

They are temporary directories created by pacman for downloading the packages during updates and package installations, and they should normally automatically get removed, but due to a bug, the removal doesn’t happen.

You can delete them manually, but you’ll need to use sudo, because a normal user acount does not have write privileges in that part of the filesystem tree.

Open up a terminal window and issue the following command…:backhand_index_pointing_down:

sudo rm -rf /var/cache/pacman/pkg/download-*
5 Likes
3 Likes

My method:
sudo rm -rf /var/cache/pacman/pkg/*

2 Likes

That’s the “nuclear” option, but it does the job assuming one doesn’t need to retain any packages for re-installation. :wink:

4 Likes

This issue exists since january 2026 ! Is it really so hard to remove it ? There are discussions on archlinux forum but no solution !

I forgot to reply earlier. Anyway thank you for the help. This worked. I completely forgot about trying a terminal command for this issue. Thanks again.

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.