Is these packages necessary?

Is linux-cachyos-headers necessary if I don’t compile the kernel myself?

Is opencl-mesa necessary? Why is the dependency of ocl-icd on opencl-mesa optional?

If I don’t compile the program, are gcc and clang necessary?

If marked as required by system, then yes. I can confirm headers is required to match the kernel version, so it depends if you have linux-cachyos installed or not.
I don’t know on the others from personal experience, but I wouldn’t expect gcc or glang to be necessary if you don’t do any kernel mods. Your mileage may vary.
I mean one way to test is to remove them and see if you still boot and standard functionality when you get a new kernel update, still works.

Its dependencies include linux-cachyos, but it is not required by anything.

It depends on your system of course.

If necessary you can share the output of pacman -Qi $package so that others can inspect.

“Sorry, the file you are trying to upload is not authorized (authorized extensions: gif, png, jpeg, jpg, heic, heif, webp, avif, svg).”

Why would you need to share a file?

Surely if you intend to share output it is text - in which case the text itself is much preferred over images of text.

Installed From : cachyos-v3
名字           : linux-cachyos-headers
版本           : 7.1.1-2
描述           : Headers and scripts for building modules for the Linux EEVDF + LTO + AutoFDO + Propeller Cachy Sauce Kernel by CachyOS with other patches and improvements.
                 kernel
架构           : x86_64_v3
URL            : https://github.com/CachyOS/linux-cachyos
软件许可       : GPL-2.0-only
组             : 无
提供           : LINUX-HEADERS  linux-cachyos-lto-headers=7.1.1-2
依赖于         : binutils  glibc  libelf  libgcc  openssl  pahole  xxhash  zlib  zstd  linux-cachyos  clang  llvm  lld
可选依赖       : 无
依赖它         : 无
被可选依赖     : 无
与它冲突       : 无
取代           : linux-cachyos-lto-headers
安装后大小     : 158.68 MiB
打包者         : CachyOS <admin@cachyos.org>
编译日期       : 2026年06月24日 星期三 05时38分08秒
安装日期       : 2026年06月25日 星期四 10时34分26秒
安装原因       : 单独指定安装
安装脚本       : 否
验证者         : 数字签名

You seem to have installed it intentionally but it is otherwise not required.

I believe the headers are explicitly installed by default through Calamares and unlike much of the software it installs there doesn’t seem to be a way to stop it in this case.

clang and gcc are then attached to that. linux-cachyos-headers actually has a pretty giant pactree.

❯ pactree -c linux-cachyos-headers
linux-cachyos-headers
├─clang
│ ├─llvm-libs
│ │ ├─libgcc
│ │ ├─glibc
│ │ ├─libstdc++
│ │ ├─zlib-ng-compat provides zlib
│ │ ├─zstd
│ │ ├─libffi
│ │ ├─libedit
│ │ │ ├─glibc
│ │ │ ├─ncurses provides libncursesw.so=6-64
│ │ │ └─ncurses
│ │ └─libxml2
│ ├─gcc
│ │ ├─libasan=16.1.1+r12+g301eb08fa2c5-3
│ │ ├─libgcc=16.1.1+r12+g301eb08fa2c5-3
│ │ ├─liblsan=16.1.1+r12+g301eb08fa2c5-3
│ │ ├─libstdc++=16.1.1+r12+g301eb08fa2c5-3
│ │ ├─libtsan=16.1.1+r12+g301eb08fa2c5-3
│ │ ├─libubsan=16.1.1+r12+g301eb08fa2c5-3
│ │ ├─binutils>=2.28
│ │ ├─glibc>=2.27
│ │ ├─gmp
│ │ ├─libisl provides libisl.so=23-64
│ │ │ └─gmp
│ │ ├─libmpc
│ │ │ ├─glibc
│ │ │ ├─gmp
│ │ │ └─mpfr
│ │ ├─mpfr
│ │ ├─zlib-ng-compat provides zlib
│ │ └─zstd
│ ├─compiler-rt
│ │ ├─glibc
│ │ ├─libgcc
│ │ └─libstdc++
│ ├─libgcc
│ └─libxml2

Snipped to only show the parts relevant to the post.

Do I need it?

To be honest, I’d like to know myself.

I’m going to boot up a VM and nuke the tree and see what happens.

For a package to be hard required by the installation makes me think that we do, in fact, need the headers packages.

For what? I’m not quite sure. It’s possible that they’re there simply because the CachyOS Kernel Manager exists, even though that is something you can prevent from installing. It’s also possible that the headers are needed for some other operation that CachyOS takes advantage of but I’m just unaware of.

I guess I’m about to find out.

Edit:

❯ sudo pacman -Rns linux-cachyos-headers linux-cachyos-lts-headers 
[sudo] password for dirge: 
checking dependencies...
:: clang optionally requires llvm: referenced by some clang headers

Package (5)                Old Version  Net Change 

lld                        22.1.6-1.1     -7.34 MiB
llvm                       22.1.6-2     -137.73 MiB
pahole                     1:1.31-2.1     -1.03 MiB
linux-cachyos-headers      7.1.1-2      -160.70 MiB
linux-cachyos-lts-headers  6.18.36-1    -266.62 MiB

Total Removed Size:  573.42 MiB

:: Do you want to remove these packages? [Y/n]

After rebooting, everything is fine. At the very least, it’s safe to get rid of them. And if they become necessary at some point then there’s no reason they can’t just be added back.

building dkms modules.

Headers are for building things .. they are only required if you need to build those things.

Like this example.

No.