我的根分区几乎没有空间了,当我检查原因时,我意识到我安装了多个 linux-modules-extra 包,它们都很重,并且带有旧的内核版本。
当我跑步时
dpkg-query -W --showformat='${Installed-Size;10}\t${Package}\n' | sort -k1,1n
对于最后几个包,我得到了以下输出:
168006 linux-modules-extra-5.0.0-37-generic
168166 linux-modules-extra-5.0.0-36-generic
168204 linux-modules-extra-5.0.0-32-generic
174488 discord
176527 linux-modules-extra-5.3.0-53-generic
176554 linux-modules-extra-5.3.0-59-generic
176567 linux-modules-extra-5.3.0-61-generic
176601 linux-modules-extra-5.3.0-62-generic
176682 linux-modules-extra-5.3.0-28-generic
176683 linux-modules-extra-5.3.0-26-generic
176980 linux-modules-extra-5.3.0-46-generic
177026 linux-modules-extra-5.3.0-51-generic
177164 linux-modules-extra-5.3.0-40-generic
177199 linux-modules-extra-5.3.0-45-generic
177223 linux-modules-extra-5.3.0-42-generic
179195 linux-modules-extra-5.4.0-42-generic
179280 linux-modules-extra-5.4.0-47-generic
179315 linux-modules-extra-5.4.0-48-generic
179330 linux-modules-extra-5.4.0-52-generic
179388 linux-modules-extra-5.4.0-51-generic
233492 google-chrome-stable
243263 libgl1-mesa-dri
261334 libgl1-mesa-dri
296661 icaclient
328693 linux-firmware
我的问题是,我可以删除所有的 linux-modules-extra 包吗?
答案1
不是,因为大多数软件包都已经被卸载了。
“安装尺寸“表示安装包后占用的空间大小。任何包一次只能安装一个版本。所有其他包都已被卸载,并由较新的版本替换。
让我们看一下,使用 dpkg 列出该包的所有已知版本:
- 查看第一列:
ii
表示“已安装”,rc
表示“已卸载”
$ dpkg -l | grep linux-modules-extra
rc linux-modules-extra-4.15.0-20-generic 4.15.0-20.21 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
rc linux-modules-extra-4.15.0-22-generic 4.15.0-22.24 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
rc linux-modules-extra-4.15.0-23-generic 4.15.0-23.25 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
rc linux-modules-extra-4.15.0-24-generic 4.15.0-24.26 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
rc linux-modules-extra-4.15.0-29-generic 4.15.0-29.31 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
rc linux-modules-extra-4.15.0-30-generic 4.15.0-30.32 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
rc linux-modules-extra-4.15.0-32-generic 4.15.0-32.35 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
rc linux-modules-extra-4.15.0-33-generic 4.15.0-33.36 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
rc linux-modules-extra-4.15.0-34-generic 4.15.0-34.37 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
rc linux-modules-extra-4.15.0-36-generic 4.15.0-36.39 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
rc linux-modules-extra-4.18.0-10-generic 4.18.0-10.11 amd64 Linux kernel extra modules for version 4.18.0 on 64 bit x86 SMP
rc linux-modules-extra-4.18.0-11-generic 4.18.0-11.12 amd64 Linux kernel extra modules for version 4.18.0 on 64 bit x86 SMP
rc linux-modules-extra-4.18.0-12-generic 4.18.0-12.13 amd64 Linux kernel extra modules for version 4.18.0 on 64 bit x86 SMP
rc linux-modules-extra-4.18.0-13-generic 4.18.0-13.14 amd64 Linux kernel extra modules for version 4.18.0 on 64 bit x86 SMP
rc linux-modules-extra-4.18.0-14-generic 4.18.0-14.15 amd64 Linux kernel extra modules for version 4.18.0 on 64 bit x86 SMP
rc linux-modules-extra-4.18.0-15-generic 4.18.0-15.16 amd64 Linux kernel extra modules for version 4.18.0 on 64 bit x86 SMP
rc linux-modules-extra-4.18.0-16-generic 4.18.0-16.17 amd64 Linux kernel extra modules for version 4.18.0 on 64 bit x86 SMP
rc linux-modules-extra-4.18.0-18-generic 4.18.0-18.19 amd64 Linux kernel extra modules for version 4.18.0 on 64 bit x86 SMP
rc linux-modules-extra-5.0.0-13-generic 5.0.0-13.14 amd64 Linux kernel extra modules for version 5.0.0 on 64 bit x86 SMP
rc linux-modules-extra-5.0.0-15-generic 5.0.0-15.16 amd64 Linux kernel extra modules for version 5.0.0 on 64 bit x86 SMP
rc linux-modules-extra-5.0.0-16-generic 5.0.0-16.17 amd64 Linux kernel extra modules for version 5.0.0 on 64 bit x86 SMP
rc linux-modules-extra-5.0.0-17-generic 5.0.0-17.18 amd64 Linux kernel extra modules for version 5.0.0 on 64 bit x86 SMP
rc linux-modules-extra-5.0.0-19-generic 5.0.0-19.20 amd64 Linux kernel extra modules for version 5.0.0 on 64 bit x86 SMP
rc linux-modules-extra-5.0.0-20-generic 5.0.0-20.21 amd64 Linux kernel extra modules for version 5.0.0 on 64 bit x86 SMP
rc linux-modules-extra-5.0.0-21-generic 5.0.0-21.22 amd64 Linux kernel extra modules for version 5.0.0 on 64 bit x86 SMP
rc linux-modules-extra-5.0.0-23-generic 5.0.0-23.24 amd64 Linux kernel extra modules for version 5.0.0 on 64 bit x86 SMP
rc linux-modules-extra-5.0.0-25-generic 5.0.0-25.26 amd64 Linux kernel extra modules for version 5.0.0 on 64 bit x86 SMP
rc linux-modules-extra-5.0.0-27-generic 5.0.0-27.28 amd64 Linux kernel extra modules for version 5.0.0 on 64 bit x86 SMP
rc linux-modules-extra-5.0.0-29-generic 5.0.0-29.31 amd64 Linux kernel extra modules for version 5.0.0 on 64 bit x86 SMP
rc linux-modules-extra-5.0.0-31-generic 5.0.0-31.33 amd64 Linux kernel extra modules for version 5.0.0 on 64 bit x86 SMP
rc linux-modules-extra-5.0.0-32-generic 5.0.0-32.34 amd64 Linux kernel extra modules for version 5.0.0 on 64 bit x86 SMP
rc linux-modules-extra-5.3.0-19-generic 5.3.0-19.20 amd64 Linux kernel extra modules for version 5.3.0 on 64 bit x86 SMP
rc linux-modules-extra-5.3.0-22-generic 5.3.0-22.24 amd64 Linux kernel extra modules for version 5.3.0 on 64 bit x86 SMP
rc linux-modules-extra-5.3.0-23-generic 5.3.0-23.25 amd64 Linux kernel extra modules for version 5.3.0 on 64 bit x86 SMP
rc linux-modules-extra-5.3.0-24-generic 5.3.0-24.26 amd64 Linux kernel extra modules for version 5.3.0 on 64 bit x86 SMP
rc linux-modules-extra-5.3.0-26-generic 5.3.0-26.28 amd64 Linux kernel extra modules for version 5.3.0 on 64 bit x86 SMP
rc linux-modules-extra-5.3.0-29-generic 5.3.0-29.31 amd64 Linux kernel extra modules for version 5.3.0 on 64 bit x86 SMP
rc linux-modules-extra-5.3.0-40-generic 5.3.0-40.32 amd64 Linux kernel extra modules for version 5.3.0 on 64 bit x86 SMP
rc linux-modules-extra-5.3.0-42-generic 5.3.0-42.34 amd64 Linux kernel extra modules for version 5.3.0 on 64 bit x86 SMP
rc linux-modules-extra-5.3.0-45-generic 5.3.0-45.37 amd64 Linux kernel extra modules for version 5.3.0 on 64 bit x86 SMP
rc linux-modules-extra-5.3.0-46-generic 5.3.0-46.38 amd64 Linux kernel extra modules for version 5.3.0 on 64 bit x86 SMP
rc linux-modules-extra-5.4.0-26-generic 5.4.0-26.30 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-extra-5.4.0-28-generic 5.4.0-28.32 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-extra-5.4.0-29-generic 5.4.0-29.33 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-extra-5.4.0-31-generic 5.4.0-31.35 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-extra-5.4.0-33-generic 5.4.0-33.37 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-extra-5.4.0-37-generic 5.4.0-37.41 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-extra-5.4.0-40-generic 5.4.0-40.44 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-extra-5.4.0-42-generic 5.4.0-42.46 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-extra-5.4.0-45-generic 5.4.0-45.49 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-extra-5.4.0-47-generic 5.4.0-47.51 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc linux-modules-extra-5.4.0-48-generic 5.4.0-48.52 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
ii linux-modules-extra-5.4.0-51-generic 5.4.0-51.56 amd64 Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP