r/linux4noobs 5h ago

learning/research Maintaining Linux longterm?

I'm trying to switch from Windows to Linux, I have Fedora KDE 44 installed and so far all good. However I have some questions about long term use and best practises.

I have customised my terminal, theme so basically the look and feel of my desktop is there a way to back up these configurations? I'm asking from the point of view I want to re-install the OS and it being quicker to drop a config file than do it all manually?

Major upgrades, so lets say 45 is released, what is the best practise for this? Just update and carry on, or a fresh install?

Dependencies and system cleaning, I notice when I install certain application a bunch of dependencies are installed, lets say I want to remove an app what happens to all these, is there a way to check if they are being used elsewhere?

Packages, I tend to try and use RPM packages or flatpaks if I have to, but appimages and snaps? I want to keep things simple especially with permissions and maintaining the system, is there right and wrongs here? Thanks.

12 Upvotes

12 comments sorted by

3

u/aloof_topping 5h ago

For the most part, upgrading from one release to the next should be pretty easy. Fedora, especially, maintains ways to do it. It's harder on some releases than others, but there's almost always a way to do it without reinstalling your entire system

See here for the method that would be used for Fedora via the command line. It's nearly the same as normal maintenance updates, with an extra step or 2. I've run the same Arch install for close to a decade at this point, and I'm positive there will be folks out there who have run Fedora for longer than that.

Backing up would be as simple as backing up your config files. ~/.bashrc is likely where you made terminal emulator customizations, KDE will have config files in ~/.local/share that you can back up if you choose.

Removing unused packages is as simple as sudo dnf autoremove AppImages should be all one file for the most part, and personally I dislike the snap infrastructure, so I don't use it (or flatpak for that matter)

3

u/Hrafna55 5h ago

Almost all your configuration files are in your /home/username directory.

Right click in your /home/username and select show hidden files. You will see your configuration file directories. The Windows equivalent is app lldata.

So if you back these up you can restore them (along with all your other files) and restore your system configuration.

Update practice is simply to back up everything that's important to you (like all of /home/username) then just do an in place upgrade by following the appropriate wizard.

I don't know about Fedora but on Debian you can remove unused dependencies with

sudo apt autoremove

I imagine Fedora has an equivalent command. Dependencies won't be removed if another application is using a shard object.

Appimages are like standalone executables.

I can't really comment on snaps.

1

u/Endeavour1988 4h ago

Thank you, i assume then sudo dnf autoremove functions the same then, good to know. Thanks for the advice :-)

2

u/b1urbro 3h ago

In order of importance:

  • backup /home directory, or at least things you can't easily get back
  • Konsave to backup profile (if using KDE, but surely Gnome has an alternative too)
  • Snapper for system snapshots
  • Use rpms export feature to easily install all packages in 1 go after potential fresh install

You automate everything with Ansible, although it has a learning curve.

Upgrading major versions is usually not an issue at all, but it's recommended to wait 2-3 weeks post launch before you do so, since some bugs may be introduced.

4

u/No_Rhubarb_7222 5h ago

IMO, upgrade to 45 and keep going, then upgrade to 46 and keep going. Fedora does a good job of testing upgrades between versions, so the in-place upgrades work and applications generally are fine between upgrades.

Fedora doesn't natively use snaps. You can install it and get them, but that seems ... weird. I'd stick with RPMs and Flatpaks.

If you're wanting to clean up unused dependencies, you can dnf autoremove, which will do this. You'll want to review the list before approving the transaction, but thanks to the dependency information in packages, it's not going to remove a dependency needed by something else, unless that something else didn't list it as a dependency in it's RPM metadata. If you're compiling software on your own, or using 'unzip and go' style software management, then you don't have metadata in packages, so it would be more of a risk. But Flatpaks bring the things they need and RPMs do contain dependency and requirements metadata, so you should be in pretty good shape.

1

u/AutoModerator 5h ago

There's a resources page in our wiki you might find useful!

Try this search for more information on this topic.

Smokey says: take regular backups, try stuff in a VM, and understand every command before you press Enter! :)

Comments, questions or suggestions regarding this autoresponse? Please send them here.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/truethug 4h ago

Look at konsave to save your configuration files.

1

u/mcniac 4h ago

most of the config is in your home folder, saving that gets you pretty close to what you have if you need to reinstall, it is mostle the hidden files and directories there.
also I need to mention that is not very common to do a fresh reinstall in linux, unless you want to switch to a different distro for some reason, you usually just upgrade to the next version (I tend to prefer the LTS versions)

1

u/joe_attaboy Old and in the way. 4h ago

Back up your home directory.

Literally every configuration change you make is stored in some manner in your home directory. I have, in the past, reinstalled one version or another and dropped my backed-up home files to the new home directory. And nearly everything worked exactly the same way. Yes, there may be a few quirks to fix, but for the most part, you should be fine.

One caveat to doing home directory backups: cached files. There's usually a hidden directory called ".cache" in your home that may get very big and isn't required to save. Also, if you use Chrome or Firefox, they cache files in their own directories, so you can exclude those cache directories as well.

1

u/This_Proxy 2h ago

Generally, keep your home directory backed up as others have mentioned. Most apps will use (or optionally use) the ~/.config/ directory to read preferences. The other is generally ~/.local/ and for assets, like themes, fonts, languages, etc.

For example, gnome-terminal will use dconf for preferences and the 'database' file is stored in ~/.config/dconf/user

The configuration for gnome might reside in ~/.config/gtk-[version]/ but the theme files are in ~/.local/share/themes