Linux
Welcome to c/linux!
Welcome to our thriving Linux community! Whether you're a seasoned Linux enthusiast or just starting your journey, we're excited to have you here. Explore, learn, and collaborate with like-minded individuals who share a passion for open-source software and the endless possibilities it offers. Together, let's dive into the world of Linux and embrace the power of freedom, customization, and innovation. Enjoy your stay and feel free to join the vibrant discussions that await you!
Rules:
-
Stay on topic: Posts and discussions should be related to Linux, open source software, and related technologies.
-
Be respectful: Treat fellow community members with respect and courtesy.
-
Quality over quantity: Share informative and thought-provoking content.
-
No spam or self-promotion: Avoid excessive self-promotion or spamming.
-
No NSFW adult content
-
Follow general lemmy guidelines.
view the rest of the comments
Short answer: Because it would be bad software design.
More detailed answer: I can definitely understand the feeling but a large part of it is that text files are not databases. Trying to use them for that purpose leads to quickly running into a brick wall of scalability problems. Seriously, that wall is hit faster than one might expect.
Why use a db in the first place? Well, when a package manager installs a package, it does a lot more than install files in their specified paths and store the name. Every package also has a ton of metadata. This includes everything from the software version number and versions that it obsoletes to repo that the package is from to signatures to verify package authenticity and checksums to verify file integrity.
Storing all of this info is the sort of thing that databases excell at and text flatfiles are terrible at. The db also includes integrity checks for itself. Since the data is already stored in a db, also storing even a subset in a flatfile would be poor software design as it is unnecessarily wasting storage space in a manner that would perform significantly worse and is much more prone to data integrity failures.
So, how do you work around that for backup? Just script a dump of the installed packages from the package manager. It's trivial with apt and dnf/yum. Then, store it with dot files in your backups.
To restore, I'd recommend Ansible because it works nicely with lists of packages and has minimal dependencies.
If you don't want to interact with the package manager and like domain specific languages (or don't dislike the syntax), just use Nix and be done with it. Noone whose opinion matters is going to bully you for the choice. If, like me, you strongly dislike DSLs and the Nix syntax, the choices are pretty much Fedora Atomic, GUIX, and/or Ansible.