I have installed Linux Mint and now I want to change it to Ubuntu but I have a lot of apps and information on it.
Is there any way to get Ubuntu without losing data? Or how to back up my information and apps, then install a fresh Ubuntu and copy the backup on it?
TL;DR It is possible, but very difficult.
The method below is presented without any warranty. Use it on your own risk.
LinuxMint MATE 18.3 (Sylvia) -> Ubuntu Xenial Xerus 16.04 LTS
I have had installed LinuxMint MATE 18.3 (Sylvia). I asked myself a question - is it possible to convert it to normal Ubuntu Xenial Xerus 16.04 LTS without reinstallation?
I found great answer with script for listing packages from known repository. I adapted it to my situation:
Then ran it to find Mint packages and remove them:
Then rebooted and launched Aptitude with
sudo aptitude
.Set all packages from Obsolete and Locally Created Packages section to purge.
And checked locally installed package with:
So I reinstalled two packages listed here -
bash
andbase-files
from xenial-updates repository from terminal:Then purged all packages that does not have
ii
state (such asrc
) with:Remove Mint files from home directory:
Check system integrity with
debsums
:Then I checked system for files, that are not from Ubuntu repositories:
Removed the following objects:
And finally installed Ubuntu MATE desktop:
Reboot and I have nearly normal Ubuntu Xenial 16.04 LTS :)
LinuxMint MATE 19 (Tara) -> Ubuntu Bionic Beaver 18.04 LTS
Warning: this method was not tested. Based on 18.3 -> 16.04 LTS above.
Let's do a listing of packages from known repository:
Find Mint packages and remove them:
Launch Aptitude with
sudo aptitude
.Set all packages from Obsolete and Locally Created Packages section to purge.
Check locally installed packages with:
Reinstall two (maybe more!) packages listed here -
bash
andbase-files
from bionic-updates repository from terminal:Then purge all packages that does not have
ii
state (such asrc
) with:Remove Mint files from home directory:
Check system integrity with
debsums
:Then check system for files, that are not from Ubuntu repositories:
Remove the following objects (may be other!):
And finally install Ubuntu MATE desktop:
Reset MATE desktop settings to the defaults:
Install MATE Welcome and Software Boutique as Snaps:
Reboot and have nearly normal Ubuntu Bionic 18.04 LTS :)
LinuxMint MATE 20 (Ulyana) -> Ubuntu Focal Fossa 20.04 LTS
Let's do a listing of packages from known repository:
Find Mint packages and remove them:
Launch Aptitude with
sudo aptitude
.Set all packages from Obsolete and Locally Created Packages section to purge.
Check locally installed packages with:
Reinstall two (maybe more!) packages listed here -
bash
andbase-files
from focal-updates repository from terminal:Then purge all packages that does not have
ii
state (such asrc
) with:Remove Mint files from home directory:
Check system integrity with
debsums
:Then check system for files, that are not from Ubuntu repositories:
Remove the following objects (may be others!):
And finally install Ubuntu MATE desktop on first login:
Reset MATE desktop settings to the defaults:
Install MATE Welcome and Software Boutique as Snaps:
Reboot and have nearly normal Ubuntu Focal 20.04 LTS :)
1) Backup to an external drive your applications to a list in a text file which you'll need later, and follow this method when it comes to restoring them on Ubuntu.
2) Backup to an external drive your data using rsync, or it's GUI equivalent Grsync command.
3) Back up to an external drive your home directory (again with
rsync
). This is more tricky to restore on Ubuntu as you'll need to find the UUID after Ubuntu installation and ensure it's correctly entered in thefstab
file, or it won't mount at boot-up.4) You can also back up all Debian repositories. I understand Mint uses the same ones as Ubuntu (except Canonical). These will be restored in the
/etc/apt folder
.5) Install Ubuntu from Live UFD, making partitions for home, swap, and root. Restore home folder contents to newly made home partition and check UUID configuration in fstab as in 3). You will likely have to make a new entry for it. Restore apps and data files as in 1 - 2.
I successfully performed steps similar to those described by @N0rbert. In my case turning Mint 18.3 into Ubuntu 16.04 LTS and process went more-less like this:
I commented out
packages.linuxmint.com
repo from/etc/apt/preferences.d/official-package-repositories.pref
apt update && apt upgrade
apt remove --purge *mint*
, confirm if it complains about removingmintsystem
andsynaptic
I did install
apt install bash=4.3-14ubuntu* base-files=9.4ubuntu*
At this point
lsb_release -a
should already show Ubuntu. Removingmintsystem
was likely to be broken, do this:Then for upgrade to next Ubuntu version,
apt install update-manager-core
.Now you can check for update with
do-release-upgrade -c
and update withdo-release-upgrade
. The updater should fix anything that's been left broken. For me it worked 100% fine, but before upgrading I've also removed everything I could find related to desktop environment, since I wanted to convert it to a server-exclusive machine.Note: if along the way
apt
suddenly is not found, don't panic! It just changed its path to default. Enterbash
and in the new prompt it will work again.