Migrating Ubuntu: can I just copy the home directory?

My computer has an Ubuntu 20.04 installation that I want to reinstall (same OS). The home directory is on the same partition as the rest of the OS. Can I simply install all of the programs and then copy the entire home directory with my files and the configs of the programs? Should I do it in reverse order?


When reinstalling, there is not any chance of any issue when copying your current home folder back to a re-installation of the same version. So do not hesitate and go ahead.

Of course, you will need to eventually reinstall applications that are not installed by default. These reinstalled applications will adopt the configuration currently existing in your home folder.

The "order", installing the programs first or restoring your configuration first, really is not that critical. Newly installed programs will only write out default configuration when they are run. And even if default configuration has been written, you restoring your configuration will overwrite it.

A side note when installing a newer version of Ubuntu

Even when copying configuration back in a future version of Ubuntu, the chance of problems is very small. However, then, it it not totally unexisting. The format of configuration data may change with a future version of an application. The application may be designed to handle the transition to a new format, but other applications may not and have issues with the old configuration. However, the chance of that occurring is very small, but not zero.