Taking a snapshot is a good idea. It's generally said that you can have multiple desktop environments installed simultaneously without problems, but in my experience it isn't always a good idea.
Full-fledged environments like Gnome and KDE actually integrate quite tightly into the system. For example, KDE may install hacks that will mess up your GTK themes in Gnome. You will also get duplicates of all utility apps if you decide to install those. They also have their own display managers and so on.
You could just basically uninstall Gnome's packages and remove the configuration files from your home folder, but I would say that a full reinstall isn't a bad option if you decide to switch.
What I don't understand is why you need to run grub-install again in the first place. I thought the bug resided in the later stage files that would be managed directly by pacman, but apparently Arch isn't set up that way.
I guess there should be a strong recommendation that the user should set up a hook which runs grub-install when the package is updated.
This isn't really something I would use. I'll give you some honest feedback.
I wouldn't use C for something that could essentially be a shell script, and what your program seems to be doing is just calling a shell in the end. (There is a difference between letting a shell parse a command, and directly executing a file with an argument list)
Also I would make the configuration syntax much simpler (maybe just split it into multiple files) or use a library to parse some well known format.
If I wanted to do a system backup like you mention, I would look into btrfs + timeshift/snapper. That's what many people here use.
I'm sorry if I sounded a bit harsh. It's great that you are learning about Linux! Over the years however, one tends got get more insights into how to do things better more safely and simply.
Taking a snapshot is a good idea. It's generally said that you can have multiple desktop environments installed simultaneously without problems, but in my experience it isn't always a good idea.
Full-fledged environments like Gnome and KDE actually integrate quite tightly into the system. For example, KDE may install hacks that will mess up your GTK themes in Gnome. You will also get duplicates of all utility apps if you decide to install those. They also have their own display managers and so on.
You could just basically uninstall Gnome's packages and remove the configuration files from your home folder, but I would say that a full reinstall isn't a bad option if you decide to switch.
What I don't understand is why you need to run
grub-installagain in the first place. I thought the bug resided in the later stage files that would be managed directly by pacman, but apparently Arch isn't set up that way.I guess there should be a strong recommendation that the user should set up a hook which runs
grub-installwhen the package is updated.This isn't really something I would use. I'll give you some honest feedback.
I wouldn't use C for something that could essentially be a shell script, and what your program seems to be doing is just calling a shell in the end. (There is a difference between letting a shell parse a command, and directly executing a file with an argument list)
Also I would make the configuration syntax much simpler (maybe just split it into multiple files) or use a library to parse some well known format.
If I wanted to do a system backup like you mention, I would look into btrfs + timeshift/snapper. That's what many people here use.
I'm sorry if I sounded a bit harsh. It's great that you are learning about Linux! Over the years however, one tends got get more insights into how to do things better more safely and simply.
LVM might be a bit redundant when btrfs has subvolumes.
Just mentioning that command is a sure way to get called out on this sub lol, because it puts unnecessary load on the mirrors.
But if you have issues like in your case, it's ok to use it, but for regular use it's not needed.
Just do a pacman -Syu to get out of any potential partial upgrade state.