[root@RHEL8 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 876M 0 876M 0% /dev
tmpfs 893M 28K 893M 1% /dev/shm
tmpfs 893M 98M 796M 11% /run
tmpfs 893M 0 893M 0% /sys/fs/cgroup
/dev/sda3 18G 8.9G 8.9G 51% /
/dev/sda4 20G 13G 7.7G 62% /home/webapp/Backup
/dev/sda1 295M 293M 2.6M 100% /boot
tmpfs 179M 12K 179M 1% /run/user/42
tmpfs 179M 0 179M 0% /run/user/0
/boot partition 꽉 찼다.
[root@RHEL8 boot]# ls -al
total 275376
dr-xr-xr-x. 5 root root 4096 Jan 7 20:26 .
dr-xr-xr-x. 17 root root 244 Dec 25 18:06 ..
-rw-r--r--. 1 root root 173 Jul 19 2022 .vmlinuz-4.18.0-372.19.1.el8_6.x86_64.hmac
-rw-r--r--. 1 root root 170 Apr 16 2022 .vmlinuz-4.18.0-372.9.1.el8.x86_64.hmac
-rw-r--r-- 1 root root 170 Oct 1 2022 .vmlinuz-4.18.0-425.3.1.el8.x86_64.hmac
-rw-------. 1 root root 4360468 Jul 19 2022 System.map-4.18.0-372.19.1.el8_6.x86_64
-rw-------. 1 root root 4359450 Apr 16 2022 System.map-4.18.0-372.9.1.el8.x86_64
-rw------- 1 root root 4405925 Oct 1 2022 System.map-4.18.0-425.3.1.el8.x86_64
-rw-r--r--. 1 root root 195985 Jul 19 2022 config-4.18.0-372.19.1.el8_6.x86_64
-rw-r--r--. 1 root root 195982 Apr 16 2022 config-4.18.0-372.9.1.el8.x86_64
-rw-r--r-- 1 root root 198582 Oct 1 2022 config-4.18.0-425.3.1.el8.x86_64
drwxr-xr-x. 3 root root 17 Aug 27 2022 efi
drwx------. 4 root root 83 Dec 25 18:22 grub2
-rw-------. 1 root root 92216971 Aug 27 2022 initramfs-0-rescue-0c9687cf1ed646649ee4fa398d630f49.img
-rw------- 1 root root 27850955 Dec 25 18:20 initramfs-4.18.0-372.19.1.el8_6.x86_64.img
-rw------- 1 root root 25157632 Sep 1 2022 initramfs-4.18.0-372.19.1.el8_6.x86_64kdump.img
-rw------- 1 root root 27849827 Dec 25 18:16 initramfs-4.18.0-372.9.1.el8.x86_64.img
-rw-------. 1 root root 25184768 Aug 28 2022 initramfs-4.18.0-372.9.1.el8.x86_64kdump.img
-rw------- 1 root root 27842888 Dec 25 18:20 initramfs-4.18.0-425.3.1.el8.x86_64.img
drwxr-xr-x. 3 root root 21 Aug 27 2022 loader
lrwxrwxrwx. 1 root root 52 Aug 28 2022 symvers-4.18.0-372.19.1.el8_6.x86_64.gz -> /lib/modules/4.18.0-372.19.1.el8_6.x86_64/symvers.gz
lrwxrwxrwx. 1 root root 49 Aug 27 2022 symvers-4.18.0-372.9.1.el8.x86_64.gz -> /lib/modules/4.18.0-372.9.1.el8.x86_64/symvers.gz
lrwxrwxrwx 1 root root 49 Dec 25 18:17 symvers-4.18.0-425.3.1.el8.x86_64.gz -> /lib/modules/4.18.0-425.3.1.el8.x86_64/symvers.gz
-rwxr-xr-x. 1 root root 10460528 Aug 27 2022 vmlinuz-0-rescue-0c9687cf1ed646649ee4fa398d630f49
-rwxr-xr-x. 1 root root 10464624 Jul 19 2022 vmlinuz-4.18.0-372.19.1.el8_6.x86_64
-rwxr-xr-x. 1 root root 10460528 Apr 16 2022 vmlinuz-4.18.0-372.9.1.el8.x86_64
-rwxr-xr-x 1 root root 10743152 Oct 1 2022 vmlinuz-4.18.0-425.3.1.el8.x86_64
old kernel 이 남아 있다.
설치된 kernel을 조회해보자
[root@RHEL8 boot]# dnf list --installed kernel
Updating Subscription Management repositories.
Installed Packages
kernel.x86_64 4.18.0-372.9.1.el8 @anaconda
kernel.x86_64 4.18.0-372.19.1.el8_6 @rhel-8-for-x86_64-baseos-rpms
kernel.x86_64 4.18.0-425.3.1.el8 @rhel-8-for-x86_64-baseos-rpms
old kernel을 모두 지우자
[root@RHEL8 boot]# dnf remove --oldinstallonly
Updating Subscription Management repositories.
Dependencies resolved.
=======================================================================================================================================================
Package Architecture Version Repository Size
=======================================================================================================================================================
Removing:
kernel x86_64 4.18.0-372.9.1.el8 @anaconda 0
kernel x86_64 4.18.0-372.19.1.el8_6 @rhel-8-for-x86_64-baseos-rpms 0
kernel-core x86_64 4.18.0-372.9.1.el8 @anaconda 69 M
kernel-core x86_64 4.18.0-372.19.1.el8_6 @rhel-8-for-x86_64-baseos-rpms 69 M
kernel-devel x86_64 4.18.0-372.9.1.el8 @anaconda 52 M
kernel-devel x86_64 4.18.0-372.19.1.el8_6 @rhel-8-for-x86_64-baseos-rpms 52 M
kernel-modules x86_64 4.18.0-372.9.1.el8 @anaconda 23 M
kernel-modules x86_64 4.18.0-372.19.1.el8_6 @rhel-8-for-x86_64-baseos-rpms 23 M
Transaction Summary
=======================================================================================================================================================
Remove 8 Packages
Freed space: 287 M
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Erasing : kernel-4.18.0-372.19.1.el8_6.x86_64 1/8
Running scriptlet: kernel-4.18.0-372.19.1.el8_6.x86_64 1/8
Erasing : kernel-4.18.0-372.9.1.el8.x86_64 2/8
Running scriptlet: kernel-4.18.0-372.9.1.el8.x86_64 2/8
Erasing : kernel-devel-4.18.0-372.19.1.el8_6.x86_64 3/8
Erasing : kernel-devel-4.18.0-372.9.1.el8.x86_64 4/8
Erasing : kernel-modules-4.18.0-372.9.1.el8.x86_64 5/8
Running scriptlet: kernel-modules-4.18.0-372.9.1.el8.x86_64 5/8
Erasing : kernel-modules-4.18.0-372.19.1.el8_6.x86_64 6/8
Running scriptlet: kernel-modules-4.18.0-372.19.1.el8_6.x86_64 6/8
Running scriptlet: kernel-core-4.18.0-372.19.1.el8_6.x86_64 7/8
Erasing : kernel-core-4.18.0-372.19.1.el8_6.x86_64 7/8
Running scriptlet: kernel-core-4.18.0-372.19.1.el8_6.x86_64 7/8
Running scriptlet: kernel-core-4.18.0-372.9.1.el8.x86_64 8/8
Erasing : kernel-core-4.18.0-372.9.1.el8.x86_64 8/8
Running scriptlet: kernel-core-4.18.0-372.9.1.el8.x86_64 8/8
Verifying : kernel-4.18.0-372.9.1.el8.x86_64 1/8
Verifying : kernel-4.18.0-372.19.1.el8_6.x86_64 2/8
Verifying : kernel-core-4.18.0-372.9.1.el8.x86_64 3/8
Verifying : kernel-core-4.18.0-372.19.1.el8_6.x86_64 4/8
Verifying : kernel-devel-4.18.0-372.9.1.el8.x86_64 5/8
Verifying : kernel-devel-4.18.0-372.19.1.el8_6.x86_64 6/8
Verifying : kernel-modules-4.18.0-372.9.1.el8.x86_64 7/8
Verifying : kernel-modules-4.18.0-372.19.1.el8_6.x86_64 8/8
Installed products updated.
Removed:
kernel-4.18.0-372.9.1.el8.x86_64 kernel-4.18.0-372.19.1.el8_6.x86_64 kernel-core-4.18.0-372.9.1.el8.x86_64
kernel-core-4.18.0-372.19.1.el8_6.x86_64 kernel-devel-4.18.0-372.9.1.el8.x86_64 kernel-devel-4.18.0-372.19.1.el8_6.x86_64
kernel-modules-4.18.0-372.9.1.el8.x86_64 kernel-modules-4.18.0-372.19.1.el8_6.x86_64
Complete!
최신 kernel 만 남았다.
[root@RHEL8 boot]# dnf list --installed kernel
Updating Subscription Management repositories.
Installed Packages
kernel.x86_64 4.18.0-425.3.1.el8 @rhel-8-for-x86_64-baseos-rpms
[root@RHEL8 boot]# ls -al
total 142464
dr-xr-xr-x. 5 root root 4096 Apr 14 21:55 .
dr-xr-xr-x. 17 root root 244 Dec 25 18:06 ..
-rw-r--r-- 1 root root 170 Oct 1 2022 .vmlinuz-4.18.0-425.3.1.el8.x86_64.hmac
-rw------- 1 root root 4405925 Oct 1 2022 System.map-4.18.0-425.3.1.el8.x86_64
-rw-r--r-- 1 root root 198582 Oct 1 2022 config-4.18.0-425.3.1.el8.x86_64
drwxr-xr-x. 3 root root 17 Aug 27 2022 efi
drwx------. 4 root root 83 Dec 25 18:22 grub2
-rw-------. 1 root root 92216971 Aug 27 2022 initramfs-0-rescue-0c9687cf1ed646649ee4fa398d630f49.img
-rw------- 1 root root 27842888 Dec 25 18:20 initramfs-4.18.0-425.3.1.el8.x86_64.img
drwxr-xr-x. 3 root root 21 Aug 27 2022 loader
lrwxrwxrwx 1 root root 49 Dec 25 18:17 symvers-4.18.0-425.3.1.el8.x86_64.gz -> /lib/modules/4.18.0-425.3.1.el8.x86_64/symvers.gz
-rwxr-xr-x. 1 root root 10460528 Aug 27 2022 vmlinuz-0-rescue-0c9687cf1ed646649ee4fa398d630f49
-rwxr-xr-x 1 root root 10743152 Oct 1 2022 vmlinuz-4.18.0-425.3.1.el8.x86_64
/boot Partition에 여유가 생겼다.
[root@RHEL8 boot]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 876M 0 876M 0% /dev
tmpfs 893M 28K 893M 1% /dev/shm
tmpfs 893M 98M 796M 11% /run
tmpfs 893M 0 893M 0% /sys/fs/cgroup
/dev/sda3 18G 8.0G 9.8G 45% /
/dev/sda4 20G 13G 7.3G 64% /home/webapp/Backup
/dev/sda1 295M 163M 133M 56% /boot
tmpfs 179M 12K 179M 1% /run/user/42
tmpfs 179M 0 179M 0% /run/user/0
이거 하고 나면 항상 python symbolic link가 없어지더라 그래서 아래 명령어로 추가 해준다.
ln -s /usr/local/bin/python3 /usr/bin/python