1. 程式人生 > >Ubuntu刪除老的核心檔案

Ubuntu刪除老的核心檔案

總的步驟

  • 查詢當前核心版本: uname -a
  • 列出所有核心: dpkg –get-selections | grep linux-image
  • 刪除老的核心: sudo apt-get remove linux-image-xxxx

Example

[email protected]:~$ dpkg --get-selections | grep linux-image
linux-image-3.13.0-33-generic           deinstall
linux-image-3.13.0-34-generic           deinstall
linux-image-3.13.0-35-generic           deinstall
linux-image-3.13.0-36-generic           deinstall
linux-image-3.13.0-37-generic           deinstall
linux-image-3.13.0-39-generic           deinstall
linux-image-3.13.0-40-generic           deinstall
linux-image-3.13.0-43-generic           deinstall
linux-image-3.13.0-44-generic           deinstall
linux-image-3.13.0-46-generic           deinstall
linux-image-3.13.0-48-generic           deinstall
linux-image-3.13.0-49-generic           deinstall
linux-image-3.13.0-53-generic           deinstall
linux-image-3.13.0-55-generic           deinstall
linux-image-3.13.0-57-generic           deinstall
linux-image-3.13.0-58-generic           deinstall
linux-image-3.13.0-85-generic           deinstall
linux-image-3.13.0-86-generic           deinstall
linux-image-3.13.0-87-generic           deinstall
linux-image-3.13.0-93-generic           install
linux-image-3.2.0-24-generic-pae        deinstall
linux-image-3.2.0-67-generic-pae        install
linux-image-4.4.0-34-generic            deinstall
linux-image-extra-3.13.0-33-generic     deinstall
linux-image-extra-3.13.0-34-generic     deinstall
linux-image-extra-3.13.0-35-generic     deinstall
linux-image-extra-3.13.0-36-generic     deinstall
linux-image-extra-3.13.0-37-generic     deinstall
linux-image-extra-3.13.0-39-generic     deinstall
linux-image-extra-3.13.0-40-generic     deinstall
linux-image-extra-3.13.0-43-generic     deinstall
linux-image-extra-3.13.0-44-generic     deinstall
linux-image-extra-3.13.0-46-generic     deinstall
linux-image-extra-3.13.0-48-generic     deinstall
linux-image-extra-3.13.0-49-generic     deinstall
linux-image-extra-3.13.0-53-generic     deinstall
linux-image-extra-3.13.0-55-generic     deinstall
linux-image-extra-3.13.0-57-generic     deinstall
linux-image-extra-3.13.0-58-generic     deinstall
linux-image-extra-3.13.0-85-generic     deinstall
linux-image-extra-3.13.0-86-generic     deinstall
linux-image-extra-3.13.0-87-generic     deinstall
linux-image-extra-3.13.0-93-generic     install
linux-image-extra-4.4.0-34-generic      deinstall
[email protected]
:~$ uname -a Linux flyingbird 3.13.0-93-generic #140-Ubuntu SMP Mon Jul 18 21:20:08 UTC 2016 i686 i686 i686 GNU/Linux [email protected]:~$ sudo apt-get remove linux-image-3.2.0-67-generic-pae [sudo] password for flying-bird: Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: account-plugin-identica account-plugin-twitter fcitx-libs-gclient gir1.2-ebook-1.2 gir1.2-ebookcontacts-1.2 gir1.2-edataserver-1.2 gir1.2-messagingmenu-1.0 gir1.2-networkmanager-1.0 libllvm3.8 libmircommon5 snap-confine ubuntu-core-launcher Use 'sudo apt autoremove' to remove them. The following packages will be REMOVED: linux-image-3.2.0-67-generic-pae 0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded. After this operation, 114 MB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 320329 files and directories currently installed.) Removing linux-image-3.2.0-67-generic-pae (3.2.0-67.101) ... Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.2.0-67-generic-pae /boot/vmlinuz-3.2.0-67-generic-pae update-initramfs: Deleting /boot/initrd.img-3.2.0-67-generic-pae run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.2.0-67-generic-pae /boot/vmlinuz-3.2.0-67-generic-pae Generating grub configuration file ... Found linux image: /boot/vmlinuz-3.13.0-93-generic Found initrd image: /boot/initrd.img-3.13.0-93-generic Found memtest86+ image: /boot/memtest86+.elf Found memtest86+ image: /boot/memtest86+.bin Found Ubuntu 12.04 LTS (12.04) on /dev/sda7 done
[email protected]
:~$

這裡的12.04 LTS是當初升級Ubuntu時備份的老的作業系統。

相關推薦

ubuntu刪除多餘核心檔案

1、查詢已經安裝的核心映像 通過命令sudo dpkg --get-selections | grep linux-image 檢視已安裝的核心映像 刪除多餘安裝核心 通過命令sudo apt-get purge linux-image-..................

Ubuntu刪除核心檔案

總的步驟 查詢當前核心版本: uname -a 列出所有核心: dpkg –get-selections | grep linux-image 刪除老的核心: sudo apt-get remove linux-image-xxxx Example

ubuntu刪除多餘核心方法

檢視系統現有核心 dpkg --get-selections|grep linux-image  檢視現在使用的核心 uname -a   sudo apt-get purge  核心名稱

Ubuntu系統下常用的新建、刪除、拷貝檔案命令

  相關命令:   cd 路徑                   (進入一個路徑,比如 /usr/local/lib)   cd ..          (返回上一個資料夾)   ls         (顯示當前資料夾下的所有檔案,Linux獨有哦,dir 也

Ubuntu刪除核心、禁止核心更新

1. uname -a #檢視核心資訊 2. sudo dpkg --get-selections | grep linux-image #檢視所有已安裝及未安裝核心的資訊 3. sudo apt remove linux-image-4.15.0-39-gen

Linux運維入門~24.系統常見排錯——2.核心檔案刪除

1.設定光碟啟動拯救模式法 以虛擬機器為例,我們刪掉446位元組MBR磁碟引導 dd if=/dev/zero of=/dev/vda bs=446 count=1 這時候系統就無法開機了 關閉後 進入virt-manager 新增光碟驅動。選擇已有映

Ubuntu上U盤檔案只讀且無法刪除怎麼辦

我們在用ubuntu系統時,經常使用u盤來傳送檔案,卻不知道為什麼,你的優盤在window可以正常使用,但是到linux下檔案就變成只讀的方式了,沒法進行復制、貼上等常規操作。針對這樣的問題,如何解決呢?   最好在root使用者下執行如下命令:   (1)

ubuntu桌面被刪除或home檔案跑到桌面問題

1.ubutnu下home檔案全跑到了桌面上問題: 在使用ubuntu時難免會遇到一些問題,比如:有時候為了整理好檔案及資料夾而將home資料夾中的  圖示。 (注:這是一個圖示,在home資料夾中)刪除了,從而出現了home資料夾中的全部內容在系統重啟之

Ubuntu刪除多餘的核心

1.找出系統已經安裝的核心版本 命令:$ dpkg --get-selections | grep linux-image 2.解除安裝舊的核心版本 命令:$ sudo apt-get remove linux-image-2.6.**-**-generic    #刪除舊

nfs啟動:u-boot啟動後從ubuntu tftp下載核心及裝置樹,檔案系統掛載在nfs伺服器目錄

U-Boot# setenv netargs "setenv bootargs console=${console} ${optargs}    root=/dev/nfs  rootfstype=nfsroot    nfsroot=${serverip}:${rootpath}   ip=${ipaddr

修改ubuntu開機啟動項順序 grub設定 刪除多餘核心

1 最簡單方法,裝個軟體,圖形化操作。 sudo apt-get install startupmanager 安裝啟動項管理器 系統——系統管理——啟動項管理器,後面不解釋。然後會自動按照配置修改grub.cfg檔案了。 2 然而,grub修改開機啟動選單,

ubuntu 刪除軟體後,清理配置檔案

今天清理一下系統,使用了一個命令列,可能對其他人有參考價值   dpkg -l |grep "^rc"|awk '{print $2}' |xargs aptitude -y purge   用途:   刪除已經刪除的軟體包的殘留配置檔案。因為 debian 中 remov

Ubuntu刪除多餘舊核心

linux多次升級以後系統中會存在大量不同版本的核心,而每個核心佔用非常多的硬碟空間(一般一個核心300mb左右佔用)。所以需要定期清理沒用的核心,但最好保留最近兩個核心,因為有的軟體需要依賴特定核心而不一定是最新的。

Ubuntu-找出並殺掉所有 apt-get 或者 apt 程序& 刪除鎖定的檔案

在 Ubuntu 或者它的衍生版如 Linux Mint(我已經作為日常工作使用的系統)中使用 apt-get 命令或者其相對更新的APT 管理工具時,你可能會在命令列中看到一個 unable to lock the administration directory (/var/lib/dpkg/) is a

光貓手機自動激活系統-手機刪除onu演示

手機刪除老onu本文出自 “三塊錢的博客” 博客,請務必保留此出處http://i0794.blog.51cto.com/3235077/1949398光貓手機自動激活系統-手機刪除老onu演示

Ubuntu刪除客人帳號

點擊 printf 發現 pri guest 終端 ron 細心 所有   在一開始使用Ubuntu時還是滿興奮的,但是在多次登錄系統後發現Ubuntu有自己設置的帳號和密碼之外,還有一個“客人登錄”。細心的人就會發現客人登錄是不需要帳號和密碼的,直接點擊就能登錄。雖然說客

ubuntu刪除ppa源

ani chrome sco RR 都在 rem The sources sogou cd /etc/apt/sources.list.d 都在這裏了 drwxr-xr-x 2 root root 4096 5月 22 23:41 ./ drwxr-xr-x 6 root

解決安裝雙系統Ubuntu分割槽被日誌檔案快速耗盡

在參加機器人比賽時,實驗室購置兩臺miniPC作為機器人的控制核心,相關軟體執行在ubuntu下,於是就為其安裝ubuntu14.04且覆蓋掉預裝的win10。安裝過程設定U盤啟動後發現根本就裝不了,後面考慮到雙系統的方法,使用easyBCD加啟動選項。在win10分了幾十個G的空間用來給unu

怎樣在 Ubuntu 上使用 ZFS 檔案系統 | Linux 中國

在 Linux 系統上,有大量的檔案系統能夠使用,那麼我們為什麼還要嘗試一個新的檔案系統?它們都工作的很好。不是嗎?可是它們並不全然同樣,當中的一些檔案系統具有很突出的長處。比如 ZFS。-- Nick Congleton 本文導航◈ 為什麼選擇 ZFS

GandCrab V5.0.5勒索病毒刪除+恢復檔案,免費的解密器不可用

GandCrab V5.0.5是一種檔案鎖定病毒,自2018年初以來,它一直感染PC或不僅是普通使用者,而且還感染全世界的組織。到目前為止,估計該惡意軟體影響了全球約50萬受害者。因為它將勒索軟體作為一種服務方案執行,許多網路犯罪分子正在使用GandCrab進行敲詐勒索,這解釋了威脅的巨大普遍性,這種惡意軟體