I found this surprising since I have multiple kernels installed... Admittedly I was testing kernel 5.15 which might be the reason but I don't see why things like clang-devel would be removed.

$ rpm -qa | grep kernel | grep 5.15 | sudo xargs dnf erase -y
Dependencies resolved.
===============================================================================================================================================================================================================================================
 Package                                                                 Architecture                                  Version                                                           Repository                                       Size
===============================================================================================================================================================================================================================================
Removing:
 kernel                                                                  x86_64                                        5.15.0-0.rc1.12.fc36                                              @rawhide                                          0  
 kernel-core                                                             x86_64                                        5.15.0-0.rc1.12.fc36                                              @rawhide                                         76 M
 kernel-devel                                                            x86_64                                        5.15.0-0.rc1.12.fc36                                              @rawhide                                         61 M
 kernel-headers                                                          x86_64                                        5.15.0-0.rc1.git0.1.fc36                                          @rawhide                                        5.5 M
 kernel-modules                                                          x86_64                                        5.15.0-0.rc1.12.fc36                                              @rawhide                                         32 M
 kernel-modules-extra                                                    x86_64                                        5.15.0-0.rc1.12.fc36                                              @rawhide                                        2.0 M
Removing dependent packages:
 annobin                                                                 x86_64                                        9.79-2.fc34                                                       @updates                                        271 k
 clang-devel                                                             x86_64                                        12.0.1-1.fc34                                                     @updates                                         16 M
 gcc-gdb-plugin                                                          x86_64                                        11.2.1-1.fc34                                                     @updates                                        322 k
 golang                                                                  x86_64                                        1.16.6-2.fc34                                                     @updates                                        7.5 M
 golang-bin                                                              x86_64                                        1.16.6-2.fc34                                                     @updates                                        298 M
 kernel-devel                                                            x86_64                                        5.13.12-200.fc34                                                  @updates                                         59 M
 kernel-devel                                                            x86_64                                        5.13.14-200.fc34                                                  @updates                                         59 M
 libtool                                                                 x86_64                                        2.4.6-40.fc34                                                     @fedora                                         2.6 M
 systemtap                                                               x86_64                                        4.5-1.fc34                                                        @updates                                          0  
Removing unused dependencies:
 bison                                                                   x86_64                                        3.7.4-2.fc34                                                      @fedora                                         3.1 M
 clang                                                                   x86_64                                        12.0.1-1.fc34                                                     @updates                                        184 k
 clang-tools-extra                                                       x86_64                                        12.0.1-1.fc34                                                     @updates                                         50 M
 dyninst                                                                 x86_64                                        10.2.1-6.fc34                                                     @fedora                                          12 M
 elfutils-debuginfod-client-devel                                        x86_64                                        0.185-2.fc34                                                      @updates                                        8.9 k
 elfutils-devel                                                          x86_64                                        0.185-2.fc34                                                      @updates                                        171 k
 elfutils-libelf-devel                                                   x86_64                                        0.185-2.fc34                                                      @updates                                         34 k
 flex                                                                    x86_64                                        2.6.4-7.fc34                                                      @fedora                                         902 k
 gcc                                                                     x86_64                                        11.2.1-1.fc34                                                     @updates                                         84 M
 gcc-c++                                                                 x86_64                                        11.2.1-1.fc34                                                     @updates                                         30 M
 glibc-devel                                                             x86_64                                        2.33-20.fc34                                                      @updates                                        125 k
 glibc-headers-x86                                                       noarch                                        2.33-20.fc34                                                      @updates                                        2.0 M
 golang-src                                                              noarch                                        1.16.6-2.fc34                                                     @updates                                         51 M
 libstdc++-devel                                                         x86_64                                        11.2.1-1.fc34                                                     @updates                                         13 M
 libxcrypt-devel                                                         x86_64                                        4.4.25-1.fc34                                                     @updates                                         30 k
 libzstd-devel                                                           x86_64                                        1.5.0-1.fc34                                                      @updates                                        172 k
 mercurial                                                               x86_64                                        5.7.1-1.fc34                                                      @fedora                                          24 M
 openssl-devel                                                           x86_64                                        1:1.1.1l-1.fc34                                                   @updates                                        3.5 M
 systemtap-client                                                        x86_64                                        4.5-1.fc34                                                        @updates                                         11 M
 systemtap-devel                                                         x86_64                                        4.5-1.fc34                                                        @updates                                        8.3 M
 systemtap-runtime                                                       x86_64                                        4.5-1.fc34                                                        @updates                                        967 k
 xz-devel                                                                x86_64                                        5.2.5-5.fc34                                                      @fedora                                         202 k
 zlib-devel                                                              x86_64                                        1.2.11-26.fc34                                                    @fedora                                         138 k

Transaction Summary
===============================================================================================================================================================================================================================================
Remove  38 Packages


Am I missing something?