Is it possible to permanently disable swap while still having zram enabled?

I would like to have any kind of swap disabled, and sudo dnf remove zram-generator-defaults does the job. However, after reading a Wikipedia page about zram, I found it could be useful to have, but I would still like to not have swap. I couldn’t find anything on the internet about this, so I am starting to wonder if what I am trying to do is even possible.

Yes and no.
You can remove swap partitions and swap files, but zram is useful specifically as a swap.
In short, the default swap settings in Fedora are reasonable enough to keep swap enabled.

Have you looked at the man page for swapoff?
Have you looked at the management details for zram?

1 Like

I never knew that about zram (until I looked at the page you linked). I only noticed zram existed when it became the default for swap in Fedora. So obviously I’m not an expert but …

I assume you could just edit etc/fstab to mount a zram partition as /tmp or wherever you want a compressed ram disk.