Category: Ubuntu

That oneliner…

Once again, this is just so that I don’t forget 🙂

apt -y update && apt -y upgrade && apt -y dist-upgrade && apt -y autoremove && apt -y clean && apt -y purge && reboot

Because you just want keep your system updated … I’m sure some of the commands are redundant, but hey.. It works!

Remove all old kernels on your Ubuntu

When you login to your system and /boot is full, don’t panic!

Run this command and lean back, take a cup of coffee and relax, breath!

dpkg -l linux-* | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e [0-9] | xargs sudo apt-get -y purge

When it’s done, it’s a good idéa to:

apt-get update && apt-get upgrade && apt-get dist-upgrade

Once again, lean back, take a cup of coffee, find your inner zen!

Source: http://askubuntu.com/questions/2793/how-do-i-remove-old-kernel-versions-to-clean-up-the-boot-menu

Upgrade an Unsupported Ubuntu Linux to the latest version

If you like me stumble upon a machine running a version of Ubuntu that has become depreciated (End of Life), then fear not!

Fixing your broken sources.list

 

The first way I’ve noticed that something was wrong, was when I ran “apt-get update” and got a bunch of “404”‘s from our update server. But after some searching on the web I found that you can just replace the “archive.ubuntu.com” to “old-releases.ubuntu.com” in your /etc/apt/sources.list and use Ubuntu:s archive server to update your machine to the “latest and greatest” for your release.

sudo sed -i -re 's/([a-z]{2}\.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
sudo apt-get update && sudo apt-get dist-upgrade

You should now have a system that is as much up to date as possible, please consider doing a release upgrade now so you can continue to receive updates and security patches!

To upgrade to a new release:

Once you have performed the above steps to switch to the old-releases mirrors, update the Update Manager and then do do-release-upgrade:

sudo apt-get update
sudo apt-get install update-manager-core
sudo do-release-upgrade

Source: http://askubuntu.com/questions/91815/how-to-install-software-or-upgrade-from-an-old-unsupported-release