Fedora 删除旧内核27

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/lilil371324/article/details/81004542
  1. 查询目前已安装内核信息:
[root@localhost ~]# rpm -qa | grep kernel
kernel-modules-4.17.3-100.fc27.x86_64
kernel-modules-4.17.3-200.fc28.x86_64
kernel-core-4.14.11-300.fc27.x86_64
kernel-modules-extra-4.17.3-100.fc27.x86_64
kernel-core-4.17.3-200.fc28.x86_64
libreport-plugin-kerneloops-2.9.5-1.fc28.x86_64
kernel-4.17.3-100.fc27.x86_64
kernel-headers-4.17.3-200.fc28.x86_64
abrt-addon-kerneloops-2.10.10-1.fc28.x86_64
kernel-core-4.17.3-100.fc27.x86_64
kernel-modules-4.14.11-300.fc27.x86_64
kernel-modules-extra-4.14.11-300.fc27.x86_64
kernel-modules-extra-4.17.3-200.fc28.x86_64
kernel-4.14.11-300.fc27.x86_64
kernel-4.17.3-200.fc28.x86_64

  1. 查询当前正在运行的内核:
[root@localhost ~]# uname -r
4.17.3-200.fc28.x86_64
  1. 删除旧内核:
[root@localhost ~]# dnf remove kernel-4.14.11-300.fc27.x86_64
Repository fzug-free is listed more than once in the configuration
Repository fzug-free-source is listed more than once in the configuration
Repository fzug-nonfree is listed more than once in the configuration
Repository fzug-nonfree-source is listed more than once in the configuration
Repository fzug-testing is listed more than once in the configuration
依赖关系解决。
================================================================================
 软件包         架构           版本                      仓库              大小
================================================================================
移除:
 kernel         x86_64         4.14.11-300.fc27          @updates           0  

事务概要
================================================================================
移除  1 软件包

已释放的空间:0  
确定吗?[y/N]:y
运行事务检查
事务检查成功。
运行事务测试
事务测试成功。
运行事务
  准备中  :                                                                 1/1 
  删除    : kernel-4.14.11-300.fc27.x86_64                                  1/1 
  运行脚本: kernel-4.14.11-300.fc27.x86_64                                  1/1 
  验证    : kernel-4.14.11-300.fc27.x86_64                                  1/1 

已移除:
  kernel.x86_64 4.14.11-300.fc27                                                

完毕!
[root@localhost ~]# 
  1. 删除的内容需要小心,防止删错。fedora27有很多的内容可以删除。 再次检查删除的内容:
[root@localhost ~]# rpm -qa | grep kernel
kernel-modules-4.17.3-100.fc27.x86_64
kernel-modules-4.17.3-200.fc28.x86_64
kernel-core-4.14.11-300.fc27.x86_64
kernel-modules-extra-4.17.3-100.fc27.x86_64
kernel-core-4.17.3-200.fc28.x86_64
libreport-plugin-kerneloops-2.9.5-1.fc28.x86_64
kernel-4.17.3-100.fc27.x86_64
kernel-headers-4.17.3-200.fc28.x86_64
abrt-addon-kerneloops-2.10.10-1.fc28.x86_64
kernel-core-4.17.3-100.fc27.x86_64
kernel-modules-4.14.11-300.fc27.x86_64
kernel-modules-extra-4.14.11-300.fc27.x86_64
kernel-modules-extra-4.17.3-200.fc28.x86_64
kernel-4.17.3-200.fc28.x86_64
  1. 在删除核心内核时,会带有联动删除的功能:
[root@localhost ~]# dnf remove kernel-core-4.17.3-100.fc27.x86_64
Repository fzug-free is listed more than once in the configuration
Repository fzug-free-source is listed more than once in the configuration
Repository fzug-nonfree is listed more than once in the configuration
Repository fzug-nonfree-source is listed more than once in the configuration
Repository fzug-testing is listed more than once in the configuration
依赖关系解决。
================================================================================
 软件包                    架构        版本                 仓库           大小
================================================================================
移除:
 kernel-core               x86_64      4.17.3-100.fc27      @updates       59 M
Removing dependent packages:
 kernel                    x86_64      4.17.3-100.fc27      @updates        0  
 kernel-modules            x86_64      4.17.3-100.fc27      @updates       27 M
 kernel-modules-extra      x86_64      4.17.3-100.fc27      @updates      2.1 M

事务概要
================================================================================
移除  4 软件包

已释放的空间:88 M
确定吗?[y/N]:y
运行事务检查
事务检查成功。
运行事务测试
事务测试成功。
运行事务
  准备中  :                                                                 1/1 
  删除    : kernel-4.17.3-100.fc27.x86_64                                   1/4 
  运行脚本: kernel-4.17.3-100.fc27.x86_64                                   1/4 
  删除    : kernel-modules-extra-4.17.3-100.fc27.x86_64                     2/4 
  运行脚本: kernel-modules-extra-4.17.3-100.fc27.x86_64                     2/4 
  删除    : kernel-modules-4.17.3-100.fc27.x86_64                           3/4 
  运行脚本: kernel-modules-4.17.3-100.fc27.x86_64                           3/4 
  运行脚本: kernel-core-4.17.3-100.fc27.x86_64                              4/4 
  删除    : kernel-core-4.17.3-100.fc27.x86_64                              4/4 
  运行脚本: kernel-core-4.17.3-100.fc27.x86_64                              4/4 
  验证    : kernel-core-4.17.3-100.fc27.x86_64                              1/4 
  验证    : kernel-modules-4.17.3-100.fc27.x86_64                           2/4 
  验证    : kernel-4.17.3-100.fc27.x86_64                                   3/4 
  验证    : kernel-modules-extra-4.17.3-100.fc27.x86_64                     4/4 

已移除:
  kernel-core.x86_64 4.17.3-100.fc27                                            
  kernel.x86_64 4.17.3-100.fc27                                                 
  kernel-modules.x86_64 4.17.3-100.fc27                                         
  kernel-modules-extra.x86_64 4.17.3-100.fc27                                   

完毕!
[root@localhost ~]# 

6.多次删除之后,最终结果如下,完全移除了fedora 27 的内核内容。

[root@localhost ~]# dnf remove kernel-core-4.14.11-300.fc27.x86_64
Repository fzug-free is listed more than once in the configuration
Repository fzug-free-source is listed more than once in the configuration
Repository fzug-nonfree is listed more than once in the configuration
Repository fzug-nonfree-source is listed more than once in the configuration
Repository fzug-testing is listed more than once in the configuration
依赖关系解决。
================================================================================
 软件包                   架构       版本                    仓库          大小
================================================================================
移除:
 kernel-core              x86_64     4.14.11-300.fc27        @updates      57 M
Removing dependent packages:
 kernel-modules           x86_64     4.14.11-300.fc27        @updates      26 M
 kernel-modules-extra     x86_64     4.14.11-300.fc27        @updates     2.1 M

事务概要
================================================================================
移除  3 软件包

已释放的空间:85 M
确定吗?[y/N]:y
运行事务检查
事务检查成功。
运行事务测试
事务测试成功。
运行事务
  准备中  :                                                                 1/1 
  删除    : kernel-modules-extra-4.14.11-300.fc27.x86_64                    1/3 
  运行脚本: kernel-modules-extra-4.14.11-300.fc27.x86_64                    1/3 
  删除    : kernel-modules-4.14.11-300.fc27.x86_64                          2/3 
  运行脚本: kernel-modules-4.14.11-300.fc27.x86_64                          2/3 
  运行脚本: kernel-core-4.14.11-300.fc27.x86_64                             3/3 
  删除    : kernel-core-4.14.11-300.fc27.x86_64                             3/3 
  运行脚本: kernel-core-4.14.11-300.fc27.x86_64                             3/3 
  验证    : kernel-modules-4.14.11-300.fc27.x86_64                          1/3 
  验证    : kernel-modules-extra-4.14.11-300.fc27.x86_64                    2/3 
  验证    : kernel-core-4.14.11-300.fc27.x86_64                             3/3 

已移除:
  kernel-core.x86_64 4.14.11-300.fc27                                           
  kernel-modules.x86_64 4.14.11-300.fc27                                        
  kernel-modules-extra.x86_64 4.14.11-300.fc27                                  

完毕!
[root@localhost ~]# rpm -qa | grep kernel
kernel-modules-4.17.3-200.fc28.x86_64
kernel-core-4.17.3-200.fc28.x86_64
libreport-plugin-kerneloops-2.9.5-1.fc28.x86_64
kernel-headers-4.17.3-200.fc28.x86_64
abrt-addon-kerneloops-2.10.10-1.fc28.x86_64
kernel-modules-extra-4.17.3-200.fc28.x86_64
kernel-4.17.3-200.fc28.x86_64

猜你喜欢

转载自blog.csdn.net/lilil371324/article/details/81004542