sh Ubuntu:清理Ubuntu上的启动分区

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh Ubuntu:清理Ubuntu上的启动分区相关的知识,希望对你有一定的参考价值。

#! /bin/bash

# First check your kernel version, so you won't delete the in-use kernel image, running:
uname -r

# Now run this command for a list of installed kernels:
sudo dpkg --list 'linux-image*'

# and delete the kernels you don't want/need anymore by running this:
sudo apt-get remove --purge linux-image-${VERSION}

# When you're done removing the older kernels, you can run this to remove ever packages you won't need anymore:
sudo apt-get autoremove

# -or-
# simply enter the following into console and use auto-complete (TAB)
sudo apt-get purge linux-image-

以上是关于sh Ubuntu:清理Ubuntu上的启动分区的主要内容,如果未能解决你的问题,请参考以下文章

sh Ubuntu服务器CRON脚本:重新启动服务器,备份数据库,备份Wordpress站点文件,备份清理,Ubuntu服务器日志轮换计划

linux ubuntu /bin/sh 上的脚本错误:curl:找不到? [关闭]

sh Bash - 列出驱动器分区Ubuntu.sh

ubuntu ec2-instance 上的 cloud-init 每次启动脚本

ubuntu硬盘安装 grub 进不了引导,怎样做?

ubuntu清理磁盘空间的方法