Upgrading Ubuntu 12.04 to Ubuntu 14.04 with Mate desktop: Step 2

In the first part of this guide, we upgraded from Ubuntu 10.04 to Ubuntu 12.04 in a KVM virtual machine (VM).

There were 4.6 GB free space on / (root) partition when we started, and after do-release-upgrade had finished, we had:

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 14G 11G 2.9G 79% /

So, 2.9 GB free. Since running out of space would be less than desirable, we'll free some from apt's cache:

# apt-get clean
# df -h
Filesystem Size Used Avail Use% Mounted on
dev/vda1 14G 9.7G 3.4G 75% /

Now we have 3.4 GB free space - that should be acceptable. LibreOffice could be uninstalled prior to running another do-release-upgrade if there's a concern about requiring more space still, but I don't think it's necessary - so let's risk proceding as is.

# do-release-upgrade
Reading cache
Checking package manager

Continue running under SSH?

This session appears to be running under ssh. It is not recommended to perform a upgrade over ssh currently because in case of failure it is harder to recover.

If you continue, an additional ssh daemon will be started at port '1022'.
Do you want to continue?
Continue [yN] y
Starting additional sshd

To make recovery in case of failure easier, an additional sshd will be started on port '1022'. If anything goes wrong with the running ssh, you can still connect to the additional one.
If you run a firewall, you may need to temporarily open this port. As this is potentially dangerous it's not done automatically. You can open the port with e.g.:
'iptables -I INPUT -p tcp --dport 1022 -j ACCEPT'

To continue please press [ENTER]

Once again, we're doing this through SSH because the eventual "production" target is best accessed that way, because it's more convenient, because that's how remote machines are administered.

If you're doing this at home, you won't need SSH.

Regardless, the process asks another question:

Calculating the changes

Do you want to start the upgrade?

58 packages are going to be removed. 699 new packages are going to be installed. 1567 packages are going to be upgraded.

You have to download a total of 940 M. This download will take about 24 minutes with your connection.

Installing the upgrade can take several hours. Once the download has finished, the process cannot be canceled.

Continue [yN] Details [d]y

Supper and beverage time while things proceed...

Approximately 3 hours later we're prompted with this:

Searching for obsolete software
Reading package lists... Done
Building dependency tree
Reading state information... Done
Building data structures... Done
Building data structures... Done

Remove obsolete packages?
191 packages are going to be removed.
Removing the packages can take several hours.

Continue [yN] Details [d]y

And... a few minutes later, it seems we're up to Ubuntu 14.04:

System upgrade is complete.
Restart required
To finish the upgrade, a restart is required.
If you select 'y' the system will be restarted.

Continue [yN] y
Broadcast message from root@mom-desktop
(/dev/pts/1) at 2:16 ...

The system is going down for reboot NOW!
=== Command detached from window (Tue May 5 02:16:45 2015) ===
=== Command terminated normally (Tue May 5 02:16:45 2015) ===
Connection to 192.168.122.117 closed by remote host.
Connection to 192.168.122.117 closed.

After the system reboots:

$ ssh me@192.168.122.117
me@192.168.122.117's password:
Welcome to Ubuntu 14.04.2 LTS (GNU/Linux 3.13.0-51-generic i686)

* Documentation: https://help.ubuntu.com/

Yay, the upgrade was successful. Except now we have Unity as a desktop. And our free disk space is not good, with 1.3 GB free:

$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 14G 12G 1.3G 91% /
# apt-get clean
# apt-get autoclean
# apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
compiz-plugins-main gnome-dictionary gnome-search-tool hyphen-en-us libquvi-scripts libquvi7 libreoffice-emailmerge libreoffice-help-en-gb libreoffice-l10n-en-gb libreoffice-l10n-en-za mythes-en-us printer-driver-hpijs
0 upgraded, 0 newly installed, 12 to remove and 0 not upgraded.
After this operation, 60.4 MB disk space will be freed.
Do you want to continue? [Y/n] y

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 14G 11G 2.2G 84% /

Better: 2.2 GB free space is acceptable considering we started with 4.5 GB and haven't cleaned out anything unneeded.

In the next step, we'll finally install Mate desktop.