View previous topic :: View next topic |
Author |
Message |
cwc Veteran
Joined: 20 Mar 2006 Posts: 1402 Location: Tri-Cities, WA USA
|
Posted: Thu Mar 28, 2024 9:25 pm Post subject: modules question (can I remove) |
|
|
This is my new uname with profile 46:
Linux yoda 6.6.21-gentoo #1 SMP PREEMPT_DYNAMIC Tue Mar 12 09:48:17 PDT 2024 x86_64 Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz GenuineIntel GNU/Linux
I am assuming I can remove modules on kernels I don't have installed.
I also assume I would remove these manually.
? Aside from removing modules. What are other clean up procedures after updating a kernel?
Please throw me a bone.
Code: |
yoda ~ # ls -l /lib/modules
total 80
drwxr-xr-x 3 root root 4096 Aug 30 2022 5.15.59-gentoo
drwxr-xr-x 3 root root 4096 Sep 21 2022 5.15.68-gentoo
drwxr-xr-x 3 root root 4096 Sep 22 2022 5.15.69-gentoo
drwxr-xr-x 3 root root 4096 Oct 17 2022 5.15.74-gentoo
drwxr-xr-x 3 root root 4096 Oct 27 2022 5.15.75-gentoo
drwxr-xr-x 3 root root 4096 Jan 2 2023 5.15.80-gentoo
drwxr-xr-x 3 root root 4096 Mar 5 2023 6.1.12-gentoo
drwxr-xr-x 3 root root 4096 Mar 17 2023 6.1.19-gentoo
drwxr-xr-x 3 root root 4096 May 13 2023 6.1.27-gentoo-r1
drwxr-xr-x 3 root root 4096 May 22 2023 6.1.28-gentoo
drwxr-xr-x 3 root root 4096 Jun 13 2023 6.1.31-gentoo
drwxr-xr-x 3 root root 4096 Jul 8 2023 6.1.38-gentoo
drwxr-xr-x 3 root root 4096 Jul 30 2023 6.1.41-gentoo
drwxr-xr-x 3 root root 4096 Aug 23 2023 6.1.46-gentoo
drwxr-xr-x 3 root root 4096 Sep 20 2023 6.1.53-gentoo-r1
drwxr-xr-x 3 root root 4096 Nov 2 07:26 6.1.57-gentoo
drwxr-xr-x 3 root root 4096 Dec 9 10:13 6.1.66-gentoo
drwxr-xr-x 3 root root 4096 Dec 12 13:11 6.1.67-gentoo
drwxr-xr-x 3 root root 4096 Mar 3 08:03 6.6.13-gentoo
drwxr-xr-x 3 root root 4096 Mar 28 08:49 6.6.21-gentoo
|
Code: | yoda /lib/modules # tree 6.6.21-gentoo/
6.6.21-gentoo/
├── build -> /usr/src/linux-6.6.21-gentoo
├── kernel
│ ├── drivers
│ │ ├── gpu
│ │ │ └── drm
│ │ │ ├── drm_buddy.ko
│ │ │ ├── drm_shmem_helper.ko
│ │ │ ├── i915
│ │ │ │ └── i915.ko
│ │ │ └── tiny
│ │ │ └── simpledrm.ko
│ │ ├── media
│ │ │ ├── common
│ │ │ │ ├── uvc.ko
│ │ │ │ └── videobuf2
│ │ │ │ ├── videobuf2-common.ko
│ │ │ │ ├── videobuf2-memops.ko
│ │ │ │ ├── videobuf2-v4l2.ko
│ │ │ │ └── videobuf2-vmalloc.ko
│ │ │ └── usb
│ │ │ └── uvc
│ │ │ └── uvcvideo.ko
│ │ └── thermal
│ │ └── intel
│ │ └── x86_pkg_temp_thermal.ko
│ ├── fs
│ │ └── xfs
│ │ └── xfs.ko
│ └── net
│ ├── ipv4
│ │ └── netfilter
│ │ └── iptable_nat.ko
│ └── netfilter
│ ├── nf_log_syslog.ko
│ ├── xt_addrtype.ko
│ ├── xt_LOG.ko
│ ├── xt_mark.ko
│ ├── xt_MASQUERADE.ko
│ └── xt_nat.ko
├── modules.alias
├── modules.alias.bin
├── modules.builtin
├── modules.builtin.alias.bin
├── modules.builtin.bin
├── modules.builtin.modinfo
├── modules.dep
├── modules.dep.bin
├── modules.devname
├── modules.order
├── modules.softdep
├── modules.symbols
└── modules.symbols.bin
|
Code: | yoda /lib/modules # tree 6.6.13-gentoo/
6.6.13-gentoo/
├── build -> /usr/src/linux-6.6.13-gentoo
├── kernel
│ ├── drivers
│ │ ├── gpu
│ │ │ └── drm
│ │ │ ├── drm_buddy.ko
│ │ │ ├── drm_shmem_helper.ko
│ │ │ ├── i915
│ │ │ │ └── i915.ko
│ │ │ └── tiny
│ │ │ └── simpledrm.ko
│ │ ├── media
│ │ │ ├── common
│ │ │ │ ├── uvc.ko
│ │ │ │ └── videobuf2
│ │ │ │ ├── videobuf2-common.ko
│ │ │ │ ├── videobuf2-memops.ko
│ │ │ │ ├── videobuf2-v4l2.ko
│ │ │ │ └── videobuf2-vmalloc.ko
│ │ │ └── usb
│ │ │ └── uvc
│ │ │ └── uvcvideo.ko
│ │ └── thermal
│ │ └── intel
│ │ └── x86_pkg_temp_thermal.ko
│ ├── fs
│ │ └── xfs
│ │ └── xfs.ko
│ └── net
│ ├── ipv4
│ │ └── netfilter
│ │ └── iptable_nat.ko
│ └── netfilter
│ ├── nf_log_syslog.ko
│ ├── xt_addrtype.ko
│ ├── xt_LOG.ko
│ ├── xt_mark.ko
│ ├── xt_MASQUERADE.ko
│ └── xt_nat.ko
├── modules.alias
├── modules.alias.bin
├── modules.builtin
├── modules.builtin.alias.bin
├── modules.builtin.bin
├── modules.builtin.modinfo
├── modules.dep
├── modules.dep.bin
├── modules.devname
├── modules.order
├── modules.softdep
├── modules.symbols
└── modules.symbols.bin
|
_________________ Without diversity there can be no evolution:) |
|
Back to top |
|
|
e8root Tux's lil' helper
Joined: 09 Feb 2024 Posts: 94
|
Posted: Thu Mar 28, 2024 9:50 pm Post subject: |
|
|
Typically it is recommended to keep one backup kernel in /boot along with its modules in /lib/modules and sources in /usr/src which in case you need to revert to old kernel you change symlink in /usr/src/linux to the kernel you are using. Of course there should be entry in GRUB or whatever boot loader you are using. Said kernel you should be sure works fine.
All the rest can be removed from /boot, /usr/src and /lib/modules. In boot you might also have initramfs files if you use those for booting.
Kernels emerged by portage should be also unemerged - though I don't think it matters if you do it before or after deleting files.
There might also be copies of kernel configs in /etc/kernels if you use genkernel to build kernel. Those don't take that much disk space though. And lastly any entries for old kernels from your boot configuration.
Other than that... not 100% sure but it would seem that is it. _________________ Unix Wars - Episode V: AT&T Strikes Back |
|
Back to top |
|
|
cwc Veteran
Joined: 20 Mar 2006 Posts: 1402 Location: Tri-Cities, WA USA
|
Posted: Thu Mar 28, 2024 10:14 pm Post subject: |
|
|
e8root wrote: | Typically it is recommended to keep one backup kernel in /boot along with its modules in /lib/modules and sources in /usr/src which in case you need to revert to old kernel you change symlink in /usr/src/linux to the kernel you are using. Of course there should be entry in GRUB or whatever boot loader you are using. Said kernel you should be sure works fine.
All the rest can be removed from /boot, /usr/src and /lib/modules. In boot you might also have initramfs files if you use those for booting.
Kernels emerged by portage should be also unemerged - though I don't think it matters if you do it before or after deleting files.
There might also be copies of kernel configs in /etc/kernels if you use genkernel to build kernel. Those don't take that much disk space though. And lastly any entries for old kernels from your boot configuration.
Other than that... not 100% sure but it would seem that is it. |
Thank you! _________________ Without diversity there can be no evolution:) |
|
Back to top |
|
|
|