Ubuntu 12.04 clean up old kernels
Step 3) Filter out packages for the currently running kernel.
Whenever you need more space and heck, even if you dont here are 5 simple ways to free up disk space on Ubuntu.
To filter the list, I'm going to pipeline the output of the first command into the awk command.
What do you do once youve emptied the trash, and deleted those.ISO downloads?Maybe you installed them on the back of an awesome review, out of nosiness, or to handle a particular task.Once kernel updates start being released this partition soon fills until people are left unable to upgrade.I'm going to take you through dolphin emulator ita wii this step by step so you can see how the individual commands in this one-liner tie together.If you install kernels manually or through a third-party PPA youll need to get your hands dirty.So next time you put off that 56MB librandom-package102 update fearing youll lose space, maybe think again!
Remove Old Kernels (If No Longer Required).
I do this in monthly or bimonthly maintenance windows for our infrastructure servers.
Clean your apt cache from time-to-time Install patches, updates, and fixes Now go and free some space!As we do with Puppet, we have a base recipe that is run on all servers: cookbooks/base/recipes Edit and add: include_recipe "base:scripts" Edit and add: template do source "b" owner "root" group "root" mode "0744" end file do owner "root" group "root" mode 00744 content.Stay up to date (seriously, do it!).First I'm going to show it using the -dry-run switch with apt-get.Dpkg -l linux-* awk ii/ print 2' grep -v -e uname -r cut -f1,2 -d"-".It may be outdated.The most obvious step on this list is also the one few people would think to recommend.By best drawing apps for ipad 3 default Ubuntu keeps every update it downloads and installs avid vocal studio pro tools se in a cache on your disk, just in case you ever need it again.You can install BleachBit on Ubuntu.04 LTS straight from Ubuntu Software.Click Preview to get an estimate of how much space they take up, and click Clean to remove them.You can do it from the command line using the following command: sudo apt-get autoremove -purge, note that this command will only remove kernels that a) are no longer needed and b) were installed from the Ubuntu archive through system updates.Dpkg -l linux- step 2) Filter that list to show only installed packages.We have a few OpenStack-based projects for which this is true.