![]() ![]() Any additional parameters will be passed directly to apt-get(8).įull disclosure: I’m the author of the purge-old-kernels utility. Here’s a dry run (simulation) of what the apt-get clean command deletes: There is another command that deals with cleaning the apt cache: sudo apt-get autoclean. This will remove the content of the /var/cache/apt/archives directory (except the lock file). By default, it will keep at least the latest 2 kernels, but the user can override that value using the –keep parameter. Simply use the apt-get command with clean as argument: sudo apt-get clean. It will never remove the currently running kernel. Purge-old-kernels will remove old kernel and header packages from the system, freeing disk space. After this operation, 696 MB disk space will be freed. Done Building dependency tree Reading state information. Here, for example, I’ll save almost 700MB of disk space, by removing kernels I no longer need: $ sudo purge-old-kernels Reading package lists. In earlier releases of Ubuntu, you might need to install bikeshed, you can grab it directly from Launchpad or Github. ![]() So I was investigating via GNOME’s Disk Usage Analyser to find out which package is consuming the precious SSD space. I was running out of disk space in my test system with Ubuntu. Sometimes, a system can become slow by having. You’ll already have the purge-old-kernels command in Ubuntu 16.04 LTS (and later), as part of the byobu package. 3 min by Arindam 6 months ago 9 81.5k views This quick guide with a script helps to clean up old snap versions and free some disk space in your Ubuntu systems. If your system is running low on free space, then you can choose to wipe the data of a partition or a disk. ![]() The definitive answer is: sudo purge-old-kernels What’s the safest way to clean these up? (This question has been asked numerous times, on the and .) However, it doesn’t always work very well (especially if you install a version of Ubuntu that’s not yet released). Sometimes, sudo apt-get autoremove will clean these up. Over time, you might find your /boot directory filled with vmlinuz kernels, consuming a considerable amount of disk space. The apt utility tries its best to remove unneeded packages, from time to time, but kernels are a little tricky, due to their version strings. If you have long-running Ubuntu systems (server or desktop), and you keep those systems up to date, you will, over time, accumulate a lot of Linux kernels.Ĭanonical’s Ubuntu Kernel Team regularly (about once a month) provides kernel updates, patching security issues, fixing bugs, and enabling new hardware drivers. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |