How to reinstall Ubuntu, but keep personal files?
Solution 1
BACKUP your data FIRST. If you can't boot your Ubuntu guest any more, you can boot with a Ubuntu Live DVD, select Try Ubuntu, and copying off files to an external disk or flash drive.
You can reinstall Ubuntu and keep your existing /home directory, by booting a Ubuntu 16.04.1 Live DVD, and choosing Something Else, choosing your existing Ubuntu partition to reinstall into, and unselecting format partition.
Solution 2
If you would have placed your home directory on a separate HDD or in a separate partition last time you installed, it would do exactly what you want. However, now that you didn't do that I would:
Take a back-up of your personal data (not the entire home directory: just the Desktop Pictures Videos Documents Public Downloads Music Templates)
-
Erase all, and create 3 partitions:
- a 32GB
/
(8GB minimum, depending on what you want to do) - a
swap
using the following formula - and all the rest to
/home
- a 32GB
- Install
- Restore backup
Then, when you want to do another re-install, keeping your personal files, you can do so if you just don't format the /home
partition.
Also have a look here.
Related videos on Youtube
Dims
Updated on September 18, 2022Comments
-
Dims over 1 year
I was upgrading Ubuntu from 14.04 LTS to 16.04.1 LTS inside Virtual Box and it killed my installation. Now I wish to reinstall Ubuntu with keeping my
home
directory.Unfortunately, installer asks me for some strange choice:
It suggests several options with deletion of everything and only one option to keep my files. But this option also suggests to have TWO versions of Ubuntu installed.
What does it means? Two copies of all program and system files? Or just two kernels? I don't want two copies, I want just overwrite failed installation.
-
Boris Hamanov over 7 yearsActually you can reinstall Ubuntu and save your existing /home. Having a separate /home, especially on a small disk, or Virtualbox VM guest, makes no sense. Please see my answer. Cheers, Al