이 사이트를 이용함으로써, 당신은 다음에 동의합니다 개인 정보 보호 정책.
수용하다
엔터인IT엔터인IT엔터인IT
  • 집
  • IT 프로
  • 기술
  • 마이크로소프트
    • 하늘빛
    • 구성 관리자/SCCM
    • DPM
    • 오케스트레이터
    • 하이퍼-V
    • 마이크로소프트 엣지 인사이더
    • MSI
    • 사무실 365
    • 사무실 내부자
    • 파워 BI
    • 스카이프
    • SQL 서버
    • 팀
  • 윈도우
    • Windows 관리 센터
    • 윈도우 클라이언트
    • 윈도우 서버
  • SCCM 쿼리 컬렉션 목록
독서: Ubuntu에서 오래된 커널을 안전하게 제거하는 방법
글꼴 크기 조정기아아
엔터인IT엔터인IT
글꼴 크기 조정기아아
  • 집
  • IT 프로
  • 기술
  • 마이크로소프트
  • 윈도우
  • SCCM 쿼리 컬렉션 목록
찾다
  • 집
  • IT 프로
  • 기술
  • 마이크로소프트
    • 하늘빛
    • 구성 관리자/SCCM
    • DPM
    • 오케스트레이터
    • 하이퍼-V
    • 마이크로소프트 엣지 인사이더
    • MSI
    • 사무실 365
    • 사무실 내부자
    • 파워 BI
    • 스카이프
    • SQL 서버
    • 팀
  • 윈도우
    • Windows 관리 센터
    • 윈도우 클라이언트
    • 윈도우 서버
  • SCCM 쿼리 컬렉션 목록
리눅스

Ubuntu에서 오래된 커널을 안전하게 제거하는 방법

Published August 26, 2024
6 최소 읽기
공유하다

Ubuntu에서 오래된 커널을 안전하게 제거하는 방법.

내용물
Understanding Linux KernelsWhy Remove Old Kernels?Identifying the Current Kernel VersionListing Installed KernelsRemoving Old Kernels Using apt autoremoveRemoving Specific Kernels Using apt removeUsing GUI Tools for Kernel RemovalAutomatic Kernel RemovalSafeguard Measures결론

The Linux kernel is the heartbeat of your Ubuntu system, acting as a bridge between the software and hardware components. Over time, as you update your Ubuntu system, new kernels get installed, leaving the older ones behind. Although these old kernels serve as a fallback if the new ones encounter issues, they can accumulate and consume valuable disk space. This comprehensive guide will walk you through the process of safely removing these old kernels from your Ubuntu system.

Understanding Linux Kernels

The Linux kernel is an essential part of all Linux distributions, including Ubuntu. It is the core of the operating system, managing system resources and facilitating communication between the user and the hardware of the computer. When the kernel gets updated, the older version remains in the system as a safety net, in case the new one fails or encounters problems.

Why Remove Old Kernels?

Over time, your Ubuntu system may end up with several old kernels. While these kernels can serve as a useful backup if a new kernel causes a system issue, they can also consume significant storage space. This can particularly be a problem on systems with limited storage or on systems where the /boot partition has been configured with insufficient space. Therefore, it is beneficial to know how to remove these old kernels safely.

Identifying the Current Kernel Version

Before proceeding to remove older kernels, it’s crucial first to identify the currently active kernel version. You should never remove the kernel that your system is currently using.

You can check the version of the currently active kernel using the uname -r command in the terminal:

uname -r

The output will display your current kernel version.

Listing Installed Kernels

Now that you have identified the current kernel, it’s time to see which other kernels are installed on your system. You can list all installed kernels using the dpkg --list command:

dpkg --list | grep -E -i --color 'linux-image|linux-headers'

This command will list all installed kernels, including the currently active one.

Removing Old Kernels Using apt autoremove

The simplest method to remove old kernels from your Ubuntu system is by using the apt autoremove command. This command automatically removes all packages that were automatically installed to satisfy dependencies for other packages and are now no longer needed:

sudo apt autoremove --purge

This command will keep the latest kernel and the one other most recent kernel version on the system, removing all others.

Removing Specific Kernels Using apt remove

If you want to remove a specific kernel rather than all old kernels, you can use the apt remove command. This command allows you to specify the exact kernel version you wish to remove:

sudo apt purge linux-image-[version] sudo apt purge linux-headers-[version]

Replace [version] with the exact version number of the kernel you wish to remove.

Using GUI Tools for Kernel Removal

If you prefer a graphical interface over the command line, you can use GUI tools like Synaptic Package Manager to manage your kernels. Synaptic is a powerful package management tool that provides detailed information about installed packages, allows you to search packages using filters, and lets you select multiple packages for installation or removal.

To use Synaptic for kernel removal, first, install it using the following command:

sudo apt install synaptic

After installing Synaptic, you can launch it from the application menu. In Synaptic, you can search for ‘linux-image’ or ‘linux-headers’ to list all kernel-related packages. You can then select the old kernels you want to remove and mark them for complete removal.

Automatic Kernel Removal

Modern Ubuntu systems (버전 18.04 그리고 위) have the ability to automatically remove old kernels when updating to a new one. This feature is part of the unattended-upgrades package and is enabled by default. When a new kernel is installed, the system automatically marks the oldest one for removal.

Safeguard Measures

While removing old kernels can free up disk space, it’s crucial to do so carefully. Always keep at least one or two old kernels as a backup in case the current one fails. 또한, never attempt to remove the currently active kernel.

결론

Proper management of Linux kernels is essential for maintaining a healthy and efficient Ubuntu system. Although old kernels serve as a backup, they can consume valuable disk space if they accumulate. Knowing how to safely remove these old kernels can help optimize your system’s performance. 하지만, always proceed with caution and ensure you keep at least a couple of old kernels as a safety net.

Remember, the command line is a powerful tool that can greatly impact your system. Always double-check your commands, especially when performing operations with root privileges. Happy kernel management!

태그됨:리눅스Ubuntu
이전 기사 AlmaLinux에 SQLite3 설치 9 소스에서
다음 기사 Guide for Installing Composer on CentOS 8
코멘트를 남겨주세요 코멘트를 남겨주세요

답장을 남겨주세요 답장 취소

귀하의 이메일 주소는 공개되지 않습니다. 필수 입력란이 표시되어 있습니다 *

이 사이트는 스팸을 줄이기 위해 Akismet을 사용합니다.. 댓글 데이터가 처리되는 방법 알아보기.

번역

English中文(简体)DanskNederlandsFrançaisDeutschItaliano한국어PolskiPortuguêsRomânăEspañolУкраїнська
 번역 편집
~에 의해 Transposh - translation plugin for wordpress

인기 게시물

Windows Server의 시스템 요구 사항 2016
윈도우 서버
구성 관리자 쿼리 컬렉션 목록
구성 관리자 쿼리 컬렉션 목록
구성 관리자
클래식 팀 사이트의 최신 페이지에서 구조적/관리형 탐색 활성화
기술
SCCM이 DP 위치를 MP에서 예상 버전으로 가져오지 못했습니다.
구성 관리자

최근 게시물

Ubuntu에서 SSH 보호를 위한 Fail2ban 설치 및 구성 24.04
리눅스
AlmaLinux에서 FirewallD 활성화 및 구성
리눅스
AlmaLinux에서 사용자 생성 및 SSH 키 설정
리눅스
AlmaLinux에서 비밀번호를 재설정하는 방법
리눅스

© 2023 엔터인IT

모바일 버전으로 이동하십시오
광고배너
돌아온 것을 환영합니다!

귀하의 계정에 로그인하세요

사용자 이름 또는 이메일 주소
비밀번호

비밀번호를 잃어버렸습니다?