this post was submitted on 14 Dec 2023
0 points (NaN% liked)

Linux

47233 readers
782 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
0
submitted 9 months ago* (last edited 9 months ago) by Pantherina@feddit.de to c/linux@lemmy.ml
 

Disclaimer

Flatpak uses OSTree, like Fedora Atomic Desktops (Silverblue, Kinoite etc) and similar to BTRFS snapshots.

So many files are deduplicated and linked, not actually there

https://gitlab.com/TheEvilSkeleton/flatpak-dedup-checker

50GB without
31GB with deduplication
21,4GB with BTRFS compression
top 33 comments
sorted by: hot top controversial new old
[–] ace@lemmy.ananace.dev 0 points 9 months ago (2 children)

A lot of that data doesn't actually exist, ostree hardlinks data blobs internally, so the actual size on disk is much smaller than most disk usage tools will show.

[–] Iapar@feddit.de 0 points 9 months ago (1 children)

What does "ostree hardlinks data blobs internally" mean?

[–] ace@lemmy.ananace.dev 0 points 9 months ago* (last edited 9 months ago) (1 children)

Flatpak uses OSTree - a git-like system for storing and transferring binary data (commonly referred to as 'blobs'), and that system works by addressing such blobs by hashes of their content, using Linux hardlinks (multiple inodes all referring to the same disk blocks) to refer to the same data everywhere it's used.

So basically, whenever Flatpak tells OSTree to download something, it will only ever store only copy of that same object (.so-file, binary, font, etc), regardless of how many times it's used by applications across the install.
Note that this only happens internally in the OSTree repo - i.e. /var/lib/flatpak or ~/.local/share/flatpak, so if you have multiple separate Flatpak installations on your system then they can't automagically de-duplicate data between each other.

[–] Iapar@feddit.de 0 points 9 months ago

Thank you for the explanation.

[–] Pantherina@feddit.de 0 points 9 months ago

Thanks! The same goes for ostree system versions and BTRFS snapshots probably.

I have a similar problem with virt-manager and I think that doesnt create dynamically allocated qcow2 containers?

[–] Diabolo96@lemmy.dbzer0.com 0 points 9 months ago* (last edited 9 months ago) (1 children)

That's why I think AppImage is the best. Despite needing to pack everything it needs it's always far more lightweight than flatpak. I'd rather download a 50mb appimage than several gigabytes of an entire OS libraries and then the updates requiring roughly the same size. That and I have a shitty internet

[–] Pantherina@feddit.de 0 points 9 months ago (3 children)

I dont think that is true at all. Appimages are slowest and have many disadvantages like

  • no repo (= virus danger)
  • no app desktop entry
  • no updates
  • no deduplication of libraries
[–] callyral@pawb.social 0 points 9 months ago (1 children)

no app desktop entry

they can be added manually but yeah i get how that's inconvenient.

just run ./appimage.appimage --appimage-extract and you have the .desktop file there, then just edit the path to the executable

[–] Pantherina@feddit.de 0 points 9 months ago

Yes but that is unimportant. This is not user friendly at all. I do that all the time for random stuff, but especially on GNOME the system hides stuff like that away from users and thats okay.

[–] Diabolo96@lemmy.dbzer0.com 0 points 9 months ago (1 children)

There was an app that dealt with desktop entry and auto-update but it hasn't bee updated since a few years already.

no repo (= virus danger)

Can be remedied with an official store/ being distrubuted by the devs themselves instead of random people. Appimage isn't getting a tenth of the support flatpak is getting.

no deduplication of libraries

Might worth it if you have dozens of very heavy apps but it's totally not the case if you only need a few simple programs.

[–] Pantherina@feddit.de 0 points 9 months ago

Yes, Appimages lost the race. The apps are old afaik, and often dont work. It sucks when distributors use Appimages as they are simply a bad app format.

  • SimpleX
  • Balena Etcher

There is a way to convert Appimages to Flatpaks, but I havent got that complete.

https://github.com/trytomakeyouprivate/Appimage-To-Flatpak

[–] Unmapped@lemmy.ml 0 points 9 months ago* (last edited 9 months ago) (1 children)

I always use the app image if they are available. As for being slow I never noticed.

No app desktop entry is one on the reasons I like them. If its one I use a lot I make a hotkey to open it. But there are ways to add them. There is even a tool that makes its easy to do.

No updates. I'm not sure how exactly, but everyone I use auto updates when I open them. I originally had a issue of it breaking my hotkey cause the file name would change because of the version number going up. Which I fixed by using a *.

[–] Pantherina@feddit.de 0 points 9 months ago* (last edited 9 months ago)

The appimages I used dont autoupdate. But even if, you are in some weird "windows is bad" state from years ago, before the MS Store, and even without desktop entries.

There simply is no reason for appimages other than on systems like Tails that are not made to install apps. But I also think Tails is pretty annoying and should allow flatpak installs in the permanent storage partition.

[–] drwankingstein@lemmy.dbzer0.com 0 points 9 months ago* (last edited 9 months ago) (1 children)

Flatlack is weird. Sometimes it's really good, but then other times depending on what you install it really bloons up.

[–] Pantherina@feddit.de 0 points 9 months ago

Those are unmaintained apps and you probably shouldnt use them. Poorly this is not as obvious and cant be enforced.

[–] Quackdoc@lemmy.world 0 points 9 months ago (1 children)

I fell for the lie of flatpak not being bloated, I just nuked flatpak from my PC since I just run arch anyways. Im not sure if repo is safe to remove. You might be able to run rmlint -g and see how much data can be deduplicated on an FS level, I never checked myself since I run f2fs, but if you run an FS with dedupe capabilities it may work for you.

[–] Pantherina@feddit.de 0 points 9 months ago (1 children)

Flatpak uses ostree just as my system. So probably lots of the files are already deduplicated and it is not as dramatic as it seems.

[–] drwankingstein@lemmy.dbzer0.com 0 points 9 months ago* (last edited 9 months ago) (1 children)

It's not as dramatic for me but it's still bad. I myself freed at least 20 Gb from my computer when I remove flat pack and all of its crap. and migrated my apps to aur myself.

[–] Pantherina@feddit.de 0 points 9 months ago (1 children)

So you dont have isolation from the system and a working permission system anymore...

[–] drwankingstein@lemmy.dbzer0.com 0 points 9 months ago (1 children)

If I need isolation, I can use fire jail. And I don't know why I think they don't have a working permission system. It works perfectly fine.

[–] Pantherina@feddit.de 0 points 9 months ago (1 children)

Firejail has some major vulnerabilities if you want to be secure. Bubblejail would be preferred but it has even less documentation not to mention presets like with Flatpak. So you need to sandbox every app yourself afaik

[–] Frederic@beehaw.org 0 points 9 months ago (1 children)
[–] Pantherina@feddit.de 0 points 9 months ago

Because its a modern package system that is free, focused on making every app run, has isolation, sandboxing and a permission system

[–] chitak166@lemmy.world 0 points 9 months ago* (last edited 9 months ago) (1 children)

Immutability and sandboxing are, and always have been, a meme.

[–] Pantherina@feddit.de 0 points 9 months ago (1 children)

Security is a meme XD just remove your password, what do you got to hide? Lets all be a communist botnet!

[–] chitak166@lemmy.world 0 points 9 months ago (1 children)

Why are you replying to me?

[–] Vilian@lemmy.ca 0 points 9 months ago (1 children)

https://gitlab.com/TheEvilSkeleton/flatpak-dedup-checker

here a script to compare the size without or with deduplication

[–] Pantherina@feddit.de 0 points 9 months ago* (last edited 9 months ago)

Thanks!

50GB without
31GB with deduplication
21,4GB with BTRFS compression

And I have to say I have many apps. Not as many anymore, and no EOL runtimes apart Onionshare anymore.

[–] tanja@lemmy.blahaj.zone 0 points 9 months ago (1 children)

Removing /repo is not considered safe, but I just removed its contents anyways and then just ran a repair.

That actually resulted in more available disk space than after running the garbage collection.

And my flatpak apps still work 🤷‍♀️

[–] Pantherina@feddit.de 0 points 9 months ago