Can I Delete Linux Headers?
Contents

Those are header files are contained in the linux-headers-* and linux-headers-*-generic packages. It should be safe to remove them through apt-get.

How do I delete all unused Linux kernel headers?

The procedure to delete all unused old kernels on Ubuntu Linux version 18.04 and 20.04 LTS is as follows:

  1. First, boot into a new kernel.
  2. List all other older kernel using the dpkg command.
  3. Note down system disk space usage by running the df -H command.
  4. Delete all unused old kernels, run: sudo apt –purge autoremove.

21 февр. 2021 г.

How do I remove unused Linux kernels?

Remove All Old Kernels Using the Command Line

The system scans for unused kernels and displays a summary of the files it wants to delete. It prompts you to confirm your choice to remove old kernels by pressing y and Enter to delete.

Maya Lin-Takahashi

Maya Lin-Takahashi

Consumer Tech & Gadget Reviewer

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.

Share this article
Twitter Facebook Pinterest