Reuse old home folder on new Linux install? - Page 1
Forum section: electronics / general

author: Circlotron
author_rank: Super Contributor
timestamp: July 09, 2024, 10:54:00 pm
content: I want to do a fresh install of latest Linux Mint Mate but don’t want the hassle of reinstalling and setting up all my apps. Can I just save my home folder contents and simply copy it into the new home folder, or will there be a million broken things and that approach is just to simplistic?

author: langwadt
author_rank: Super Contributor
timestamp: July 09, 2024, 11:12:19 pm
content: most apps are probably not installed in your home directory

author: themadhippy
author_rank: Super Contributor
timestamp: July 09, 2024, 11:21:45 pm
content: should be fine. I've got my home folder on its own drive,only issue i had with a previous os renewal was firefox getting upset that the bookmarks etc were from a newer version than the version installed,updated firefox and all was good again.https://www.howtogeek.com/442101/how-to-move-your-linux-home-directory-to-another-hard-drive/might help.

author: SiliconWizard
author_rank: Super Contributor
timestamp: July 10, 2024, 12:01:06 am
content: If you reinstall the same applications, that should work ok. Don't copy the contents of the.cache directory though, it will take an useless amount of storage and may break some things after a reinstall.

author: DiTBho
author_rank: Super Contributor
timestamp: July 10, 2024, 01:29:43 am
content: Best (ideal?) is /home on a dedicated device.This way you can wipe and reinstall the system without the fear of deleting or damaging anything personal.

author: pcprogrammer
author_rank: Super Contributor
timestamp: July 10, 2024, 05:50:53 am
content: Quote from: DiTBho on July 10, 2024, 01:29:43 amAs long as you don't share it between two different Linux installs it should be fine, but you will still have to reinstall applications that are not in your home folder. These applications might have settings stored in your home folder, so look for these (ctrl-h to make hidden files visible) and backup them to allow you to write them back after installing the application.

author: DiTBho
author_rank: Super Contributor
timestamp: July 10, 2024, 07:56:05 am
content: Quote from: pcprogrammer on July 10, 2024, 05:50:53 amumm, strictly UNIX style speaking, binaries and libraries should not stay in the /home folder!the /home folder should only be for users' working files, and local configurations.

author: Whales
author_rank: Super Contributor
timestamp: July 10, 2024, 10:34:23 am
content: Be very wary of the installer, it might want to "format" the partition you have /home on. Make backups before trying anything, even if you think you have it right.

author: pcprogrammer
author_rank: Super Contributor
timestamp: July 10, 2024, 01:00:30 pm
content: Quote from: DiTBho on July 10, 2024, 07:56:05 amTrue, but Arduino and some other IDE's did do this, or at least store a lot of stuff to hidden folders in your home directory.If so to get them working again on a fresh install you have to at minimum create a new menu item for them to easily start them.

author: DiTBho
author_rank: Super Contributor
timestamp: July 10, 2024, 01:21:20 pm
content: extra/abnormal applications(1) should remain in the /opt folder, and to be "fully independent" (like a MacOS Application) it should be statically linked, and made to self contain its configuration.(1) Java VM, Adobe Reader, Adobe, ... EagleCAD, ...

author: retiredfeline
author_rank: Frequent Contributor
timestamp: July 10, 2024, 02:04:42 pm
content: Many suites nowadays install executables under the home directory in places like .local/share because they are user specific and/or the user doesn't have admin rights.

author: bingo600
author_rank: Super Contributor
timestamp: July 10, 2024, 02:52:01 pm
content: Quote from: Circlotron on July 09, 2024, 10:54:00 pmYesYou have to make sure the "user & group numbers match" on old vs new machine.And you want to make sure the copied /home is in place before starting the apps like FF & Tbird.If you don't already have a separate /homeCopy as root /home to different media : cp -aR to USB disk or whatever.I have previously done atwo stepinstall to make sure there's no issues w /home in place when installing:Step 1:Copy old /home to usb mediaInstall Mint (format disk) (make separate /home)Start, login make sure your user+group (numbers) is the same as on old machineAs root cp -aR /home from usb media to /home partition.Step2:Now i reinstalled Mint again , but without formatting the /home partitionWhen done installing ...Install needed apps : ie. FF + Tbolt etc ...Now most apps will detect & use their already installed data in /homeISTR - I had a few issues with e-mail certificates etc ... Had to reinstall, but nothing serious./BingoPs: Now you have hopefully learned, toalwaysdo a separate /home partition, if you'll have anything worth keeping when reinstalling.

author: SiliconWizard
author_rank: Super Contributor
timestamp: July 10, 2024, 11:12:58 pm
content: Quote from: DiTBho on July 10, 2024, 07:56:05 amYes, my post above was meaning that, only user files and configuration/preference files copied, and don't copy anything from the .cache directory. Don't install programs there.That said, I know some Linux software packages, that are distributed outside of your Linux distribution, do install stuff by default in the home directory (like many commercial Linux software).It's probably best, in this case, not to copy these files over, and reinstall this software.I'd recommend installing such packages in the /opt directory, which is the one that is, by convention, more appropriate for this.With that said, if the OP is reinstalling the exact same Linux distro with the exact same version, then even installed programs should work as is if just copied over.But the OP didn't really say the details. What was the original Linux distro, and what's the new "fresh" one?

author: Circlotron
author_rank: Super Contributor
timestamp: July 11, 2024, 12:07:15 pm
content: Quote from: SiliconWizard on July 10, 2024, 11:12:58 pmExisting distro is Mint 19.3 Tricia 64-bit.New one is not-yet-released Mint 22.

author: SiliconWizard
author_rank: Super Contributor
timestamp: July 11, 2024, 11:21:49 pm
content: I have installed latest Lattice Radiant on Linux recently, Linux version. (I used to use the Windows version on Wine, as the Linux version had dependency issues for me.)I managed to solve the dependency issues and it runs fine.It does get installed in your home directory by default. You can change the install path, but obviously you need write access to it while installing, and running the Lattice installer with elevated permissions doesn't look too appealing, so I've stuck with the home directory for now. I could install it containerized to avoid security issues, but I didn't bother for now.

author: SiliconWizard
author_rank: Super Contributor
timestamp: July 11, 2024, 11:24:40 pm
content: Quote from: Circlotron on July 11, 2024, 12:07:15 pmWell, you can save and restore your config files, again do not restore the .cache directory. And, if you have any application installed in your home dir, as I said, i'd recommend not copying them and reinstalling them after your upgrade, as system library versions are going to be different and you may run into dependency issues.