美文网首页
软件更新提示磁盘空间不足

软件更新提示磁盘空间不足

作者: Mr_Wang简书 | 来源:发表于2017-12-10 14:37 被阅读0次

    ubuntu软件更新经常提示:

    2017-12-10 13:16:52屏幕截图.png
    通过网上搜索看到一个有用的帖子http://blog.csdn.net/longfeiah/article/details/38531515得知原因为系统升级会下载多余的内核。
    解决办法如下:
    1、命令:dpkg --get-selections |grep linux//带image的为系统内核
    2017-12-10 13:18:59屏幕截图.png
    2、命令:uname -a //查看系统当前使用内核
    2017-12-10 13:20:19屏幕截图.png
    3、命令:sudo apt-get remove image-3.19.0-25-generic
    2017-12-10 13:24:53屏幕截图.png

    表明之前已经删除过此内核,再1中通过deinstalled也可以看出。
    4、命令:sudo apt-get remove image-3.19.0-80-generic

    wdh@wdh-ThinkPad-X230:~$ sudo apt-get remove image-3.19.0-80-generic
    正在读取软件包列表... 完成
    正在分析软件包的依赖关系树       
    正在读取状态信息... 完成       
    注意,根据正则表达式 image-3.19.0-80-generic 选中了 linux-image-3.19.0-80-generic
    注意,根据正则表达式 image-3.19.0-80-generic 选中了 linux-signed-image-3.19.0-80-generic
    Package 'linux-signed-image-3.19.0-80-generic' is not installed, so not removed
    下列软件包是自动安装的并且现在不需要了:
      anjuta-common fonts-opensymbol gtkpod-data id3v2 kde-l10n-engb kde-l10n-zhcn
      libanjuta-3-0 libao-common libao4 libatomicparsley0 libboost-date-time1.54.0
      libboost-system1.54.0 libcdr-0.0-0 libclucene-contribs1 libcmis-0.4-4
      libcolamd2.8.0 libexttextcat-2.0-0 libexttextcat-data libgdl-3-5
      libgdl-3-common libgtkpod1 libhyphen0 libid3-3.8.3c2a libid3tag0
      liblangtag-common liblangtag1 libllvm3.6 libmspub-0.0-0 libmythes-1.2-0
      libneon27-gnutls libntdb1 liborcus-0.6-0 libreoffice-style-human
      libvisio-0.0-0 libwpd-0.9-9 libwpg-0.2-2 libwps-0.2-2
      linux-headers-3.19.0-25 linux-headers-3.19.0-25-generic
      linux-headers-generic-lts-vivid lp-solve python-ntdb uno-libs3 ure
      vorbis-tools xfonts-mathml
    Use 'apt-get autoremove' to remove them.
    下列软件包将被【卸载】:
      linux-generic-lts-vivid linux-image-3.19.0-80-generic
      linux-image-extra-3.19.0-80-generic linux-image-generic-lts-vivid
    升级了 0 个软件包,新安装了 0 个软件包,要卸载 4 个软件包,有 7 个软件包未被升级。
    解压缩后将会空出 208 MB 的空间。
    您希望继续执行吗? [Y/n] Y
    (正在读取数据库 ... 系统当前共安装有 286812 个文件和目录。)
    正在卸载 linux-generic-lts-vivid (3.19.0.80.62) ...
    正在卸载 linux-image-generic-lts-vivid (3.19.0.80.62) ...
    正在卸载 linux-image-extra-3.19.0-80-generic (3.19.0-80.88~14.04.1) ...
    run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.19.0-80-generic /boot/vmlinuz-3.19.0-80-generic
    run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.19.0-80-generic /boot/vmlinuz-3.19.0-80-generic
    update-initramfs: Generating /boot/initrd.img-3.19.0-80-generic
    run-parts: executing /etc/kernel/postinst.d/pm-utils 3.19.0-80-generic /boot/vmlinuz-3.19.0-80-generic
    run-parts: executing /etc/kernel/postinst.d/update-notifier 3.19.0-80-generic /boot/vmlinuz-3.19.0-80-generic
    run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.19.0-80-generic /boot/vmlinuz-3.19.0-80-generic
    Generating grub configuration file ...
    Found linux image: /boot/vmlinuz-4.4.0-101-generic
    Found initrd image: /boot/initrd.img-4.4.0-101-generic
    Found linux image: /boot/vmlinuz-4.4.0-98-generic
    Found initrd image: /boot/initrd.img-4.4.0-98-generic
    Found linux image: /boot/vmlinuz-3.19.0-80-generic
    Found initrd image: /boot/initrd.img-3.19.0-80-generic
    Found memtest86+ image: /memtest86+.elf
    Found memtest86+ image: /memtest86+.bin
    Found Windows 8 (loader) on /dev/sda1
    done
    正在卸载 linux-image-3.19.0-80-generic (3.19.0-80.88~14.04.1) ...
    Examining /etc/kernel/postrm.d .
    run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.19.0-80-generic /boot/vmlinuz-3.19.0-80-generic
    update-initramfs: Deleting /boot/initrd.img-3.19.0-80-generic
    run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.19.0-80-generic /boot/vmlinuz-3.19.0-80-generic
    Generating grub configuration file ...
    Found linux image: /boot/vmlinuz-4.4.0-101-generic
    Found initrd image: /boot/initrd.img-4.4.0-101-generic
    Found linux image: /boot/vmlinuz-4.4.0-98-generic
    Found initrd image: /boot/initrd.img-4.4.0-98-generic
    Found memtest86+ image: /memtest86+.elf
    Found memtest86+ image: /memtest86+.bin
    Found Windows 8 (loader) on /dev/sda1
    done
    

    5、以后遇到这样的问题,可以继续多余的内核文件删除。
    6、输入sudo update-grub更新一下引导启动项。切记!切记!否则更改了启动项可能要重装系统。

    2017-12-10 14:17:01屏幕截图.png

    7、再查看一下内核的情况


    2017-12-10 14:04:34屏幕截图.png

    可以看到,image-3.19.0-825-generic和image-3.19.0-80-generic均为deinstalled状态
    8、此刻,按win键打开dashboard,输入update打开软件更新器


    2017-12-10 14:11:10屏幕截图.png 2017-12-10 14:13:48屏幕截图.png

    安装更新成功!

    相关文章

      网友评论

          本文标题:软件更新提示磁盘空间不足

          本文链接:https://www.haomeiwen.com/subject/cozmixtx.html