怎么在Ubuntu中删除多余内核

  介绍

怎么在Ubuntu中删除多余内核?很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。

<强>第一步:查看当前内核

rew 美元,uname  a   Linux  rew  4.15.0-42-generic  # 45 ~ 16.04.1-Ubuntu  SMP  Mon  Nov  19, 13:02:27  UTC  2018年,x86_64  x86_64  x86_64  GNU/Linux

当前使用版本为:4.15.0-42-generic

<强>第二步:查看所有内核

rew 美元,dpkg ——get-selections  |, grep  Linux   console-setup-linux ,,,,,,,,,,安装   libselinux1: amd64 ,,,,,,,,,,,安装   libselinux1: i386 ,,,,,,,,,,,安装   linux-base ,,,,,,,,,,,,,,安装   linux-firmware ,,,,,,,,,,,,安装   linux -通用- hwe - 16.04 -,,,,,,,,,安装   linux-headers-4.15.0-42 ,,,,,,,,安装   linux-headers-4.15.0-39 ,,,,,,,,安装   linux-headers-4.15.0-39-generic ,,,安装   linux-headers-4.15.0-42-generic ,,,安装   linux -头-通用- hwe - 16.04 -,,,,,安装   linux-image-4.15.0-39-generic ,,,,,安装   linux-image-4.15.0-42-generic ,,,,,安装   linux -图像-通用- hwe - 16.04 -,,,,,,安装   linux-libc-dev: amd64 ,,,,,,,,,安装   linux-libc-dev: i386 ,,,,,,,,,,安装   linux-modules-4.15.0-39-generic ,,,安装   linux-modules-4.15.0-42-generic ,,,安装   linux-modules-extra-4.15.0-39-generic 安装   linux-modules-extra-4.15.0-42-generic 安装   linux-sound-base ,,,,,,,,,,,安装   pptp-linux ,,,,,,,,,,,,,,安装   syslinux ,,,,,,,,,,,,,,,安装   syslinux-common ,,,,,,,,,,,,安装   syslinux-legacy ,,,,,,,,,,,,安装   util-linux ,,,,,,,,,,,,,,安装

<强>第三步:移除冗余内核

所有39版本的对我来说都是多余的,进行删除:

rew 美元,sudo  apt-get  remove  \   linux-headers-4.15.0-39  \   linux-headers-4.15.0-39-generic  \   linux-image-4.15.0-39-generic  \   linux-modules-4.15.0-39-generic  \   linux-modules-extra-4.15.0-39-generic

卸载后重新检查:

rew 美元,dpkg ——get-selections  |, grep  linux   console-setup-linux ,,,,,,,,,,安装   libselinux1: amd64 ,,,,,,,,,,,安装   libselinux1: i386 ,,,,,,,,,,,安装   linux-base ,,,,,,,,,,,,,,安装   linux-firmware ,,,,,,,,,,,,安装   linux -通用- hwe - 16.04 -,,,,,,,,,安装   linux-headers-4.15.0-42 ,,,,,,,,安装   linux-headers-4.15.0-42-generic ,,,安装   linux -头-通用- hwe - 16.04 -,,,,,安装   linux-image-4.15.0-39-generic ,,,,反装置   linux-image-4.15.0-42-generic ,,,,,安装   linux -图像-通用- hwe - 16.04 -,,,,,,安装   linux-libc-dev: amd64 ,,,,,,,,,安装   linux-libc-dev: i386 ,,,,,,,,,,安装   linux-modules-4.15.0-39-generic ,,,反装置   linux-modules-4.15.0-42-generic ,,,安装   linux-modules-extra-4.15.0-39-generic 反装置   linux-modules-extra-4.15.0-42-generic 安装   linux-sound-base ,,,,,,,,,,,安装   pptp-linux ,,,,,,,,,,,,,,安装   syslinux ,,,,,,,,,,,,,,,安装   null   null   null   null   null   null   null   null

怎么在Ubuntu中删除多余内核