Can't update/remove/install on Fedora because of "no disk space"
from Dariusmiles2123@sh.itjust.works to linux@lemmy.ml on 06 Jun 09:07
https://sh.itjust.works/post/20433136

Hi everyone!

A few days ago, I had a problem while trying to run KDE and Gnome as DE on Fedora 40. That problem was solved (see crosspost), but now, I can’t update Fedora anymore as it says “the transaction did not complete” and I can’t install or uninstall anything as it says I don’t have space on my disk (which is not true).

Does anyone have an idea what to do?

Edit: apparently dnf clean and dnf clean all solved the problem, so thank you everyone as I was kind of panicking when I thought about all the work involved into having my perfect install again.

publication croisée depuis : sh.itjust.works/post/20027102

Hi everyone!

Today I tried to install KDE alongside Gnome to give it a try on Fedora on something else than a virtual machine.

For a reason I can’t understand, the terminal couldn’t finish the installation of KDE as something failed. Despite all of this, all the KDE apps were installed and Plasma is appearing as an option on the login screen under Gnome and Gnome Classic. Still I couldn’t launch KDE plasma and nothing was happening after typing my login.

I took it as a sign that KDE isn’t for me, especially because I’m 99% happy with Gnome.

So I removed KDE via the terminal and the remaining apps via the software center. Sadly, there is one app called “Centre de bienvenue” or “Welcome center” from KDE that I can’t remove. Nothing is happening when I try removing it.

I tried removing it via the terminal, but when I type “dnf list installed” I can’t find it as there are too many packages. Could anyone help me?

I also tried « dnf list installed » with the words « welcome », « bienvenue », « kde » and « plasma ».

#linux

threaded - newest

Dariusmiles2123@sh.itjust.works on 06 Jun 09:09 next collapse

Here are other pictures about the problem. <img alt="" src="https://sh.itjust.works/pictrs/image/32d6eb5c-53cf-4d6d-bcaa-459df560eb85.png"> <img alt="" src="https://sh.itjust.works/pictrs/image/54c00735-0371-43b3-8d14-d026d4c50045.png"> <img alt="" src="https://sh.itjust.works/pictrs/image/81bc307b-1616-4b41-9cb1-f2a500958151.png"> <img alt="" src="https://sh.itjust.works/pictrs/image/89b8c548-3178-4e35-8230-a017d627311f.png"> <img alt="" src="https://sh.itjust.works/pictrs/image/97e517b1-60dc-434c-b398-082f5dfcdaab.png">

DmMacniel@feddit.de on 06 Jun 09:35 next collapse

What does df -h in your terminal say how much free space your system has?

Dariusmiles2123@sh.itjust.works on 06 Jun 11:20 next collapse

Here are the results

<img alt="" src="https://sh.itjust.works/pictrs/image/44ba947f-e54b-4989-8d7d-c05b39b5432a.png">

I don’t think free space is really the problem.

demonsword@lemmy.world on 06 Jun 11:45 next collapse

/dev/nvme0n1p3 shows up mounted twice, that’s kinda strange

DmMacniel@feddit.de on 06 Jun 11:49 next collapse

Mounted as / and /home

Yeah that’s really odd.

_thebrain_@sh.itjust.works on 06 Jun 14:01 collapse

Btrfs uses subvolumes instead of traditional partitioning. It takes some getting use to but it is totally normal for btrfs.

Lojcs@lemm.ee on 06 Jun 11:50 collapse

That’s normal on btrfs

demonsword@lemmy.world on 06 Jun 12:00 collapse

didn’t knew that… why it happens?

Lojcs@lemm.ee on 06 Jun 12:07 collapse

They are different subvolumes in the same filesystem but df doesn’t show subvolumes

demonsword@lemmy.world on 06 Jun 12:14 collapse

understood, thanks

_thebrain_@sh.itjust.works on 06 Jun 14:05 collapse

Btrfs and df don’t get along. There are all sorts of internals to btrfs that non btrfs utils ignore. You should run

sudo btrfs filesystem df /
sudo btrfs device usage /

It will give you a better picture of what is going on.

Balancing my help as someone above pointed out, or you may need to boot to a live media of some kind and rebuild the free space cache. Especially with btrfs I encourage people to join their mailing list for help. The devs are awesome and can help you get sorted out.

FrostyPolicy@suppo.fi on 06 Jun 13:59 collapse

This command won’t show the real values when using btrfs. You need to use sudo btrfs filesystem usage <mount point>.

CameronDev@programming.dev on 06 Jun 09:41 next collapse

sudo dnf clean?

Otherwise you’ll need to start cleaning out software your not using and/or resizing your disk partitions.

Also, check the size of the files in the /var/log directory, you may be able to shrink or delete them.

Dariusmiles2123@sh.itjust.works on 06 Jun 11:21 collapse

sudo dnf clean

That’s what I get when I execute the command

<img alt="" src="https://sh.itjust.works/pictrs/image/b7e4a4fb-3b21-4f21-bf29-8b3aa80ad763.png">

BaumGeist@lemmy.ml on 06 Jun 12:07 collapse

sudo dnf clean all

Dariusmiles2123@sh.itjust.works on 06 Jun 12:21 collapse

Sadly it doesn’t seem to change anything…

<img alt="" src="https://sh.itjust.works/pictrs/image/0163e639-c3f1-4821-b841-fe7a2cf3b7f9.png">

BaumGeist@lemmy.ml on 06 Jun 12:33 collapse

That screenshot shows the dnf clean working as intended

does a dnf update still not work?

Dariusmiles2123@sh.itjust.works on 06 Jun 13:06 collapse

Well, now everything seems to work!

So thanks a lot, even if I still don’t really understand what the problem was.

Reinstalling everything would have been a nightmare so I’m really happy everything works.

CameronDev@programming.dev on 06 Jun 14:26 collapse

The dnf clean deleted old downloaded packages. You will probably hit disk space issues again soon, so I suggest you resize your root partition at some stage if possible. Use a gparted livecd.

Dariusmiles2123@sh.itjust.works on 06 Jun 22:06 collapse

I’ll have a look into this at one point.

But then I might be dumb but I don’t understand why everywhere I was checking there seemed to be free space (CLI and GUI).

Such things are a bit frightening when you think that using Linux is way easier than Windows and then you run into these issues.

CameronDev@programming.dev on 06 Jun 23:40 collapse

Windows can have the same problem when you run out of space, but it will at least give you a helpful UI to clean everything up.

Its not clear to me either why it appeared as if there was free space, but it might be the btrfs/df incompatibility the other poster raised.

Good luck, and reach out if there are further issues :)

Dariusmiles2123@sh.itjust.works on 07 Jun 08:42 collapse

Thanks a lot for the help and advices!

It’s always nice to see how helpful everyone is on Lemmy👍

stuckgum@lemmy.ml on 06 Jun 10:36 next collapse

Can you show the errors in english

fhein@lemmy.world on 06 Jun 10:42 next collapse

If you’re using btrfs then you might need to rebalance it. I had the same problem, i.e. “no free space” while tools like df reporting that there should be available disk space, and it confused the hell out of me until I found the solution.

See manual: btrfs.readthedocs.io/en/latest/Balance.html

This are the commands I run every now and then, especially if my drive has been close to full and I delete a bunch of files to make more space:

sudo btrfs balance start -dusage=10 /
sudo btrfs balance start -dusage=20 /
sudo btrfs balance start -dusage=30 /

The / at the end is the path, since it’s my root mount which uses btrfs. The example in the manual does 40 and 50 too, but higher numbers take longer time, even on an nvme ssd.

Dariusmiles2123@sh.itjust.works on 06 Jun 11:29 next collapse

sudo btrfs balance start -dusage=30 /

That’s what I’m getting when I’m trying to run the command

<img alt="" src="https://sh.itjust.works/pictrs/image/d61b09d7-171d-41d0-b6c2-6e7e5a653ec7.png">

Lojcs@lemm.ee on 06 Jun 11:49 next collapse

If you have snapshots delete some of them. Deleting things won’t get you disk space if there are snapshots of them.

Dariusmiles2123@sh.itjust.works on 06 Jun 12:12 collapse

I don’t think I have any snapshots, or at least I’ve never created them voluntarly

Lojcs@lemm.ee on 06 Jun 12:15 collapse

You can check with sudo btrfs subvolume list /

Dariusmiles2123@sh.itjust.works on 06 Jun 12:35 collapse

sudo btrfs subvolume list /

Here is the result. I doesn’t look like I have any

<img alt="" src="https://sh.itjust.works/pictrs/image/17806854-6c23-4d7f-af43-5d9a52d93782.png">

[deleted] on 06 Jun 17:07 collapse

.

Lojcs@lemm.ee on 06 Jun 12:03 next collapse

What does balance do in that context? As I understand unless the volume spans multiple drives or the files were so numerous and small that metadata was a significant portion of their disk usage, rebalancing will only unallocate data chunks just for them to be allocated again when that space gets used.

Unless the program you’re using is wrongly checking unallocated space instead of free space, it shouldn’t really affect disk usage

Edit: It might help with trim and make the drive faster though. But you’re also putting a bunch of unnecessary wear on it so it might not be worth it

[deleted] on 06 Jun 17:02 next collapse

.

fhein@lemmy.world on 06 Jun 17:08 collapse

Don’t know that much about how btrfs works, just had a problem with the same symptoms as OP a while ago… Things started failing due to “no space left on device” despite df reporting several gigabytes available. Took a while to figure out what was going on but eventually found some stackoverflow/reddit post that told me to run the balance command and it worked. Just a single drive with btrfs, no raid.

Dariusmiles2123@sh.itjust.works on 06 Jun 20:47 collapse

sudo btrfs balance start -dusage=30 /

That’s what I got in the end after I was able to use the command you gave me. I don’t know if it helped or not. I just hope the problem I had is gone for good.

<img alt="" src="https://sh.itjust.works/pictrs/image/867e991f-bb89-48a9-abe7-61f850598e74.png">

fhein@lemmy.world on 07 Jun 20:40 collapse

That output means that it did something, but I suspect there’s a risk the same thing could happen in the future. I run this command every now and then in an attempt to avoid fragmentation, especially if the disk has been close to full, but I’m not entirely sure what’s causing it to happen in the first place.

just_another_person@lemmy.world on 06 Jun 11:10 next collapse

Honestly, if your running install is too far gone and you can’t delete some files, just go and boot a LiveCD, get your disks mounted, clean some files, then restart. You’ll be totally fine.

Dariusmiles2123@sh.itjust.works on 06 Jun 11:33 collapse

Well if none of the solutions everyone has proposed, I guess I’ll just wipe everything and install Fedora Silverblue to avoid future problems like this one…

just_another_person@lemmy.world on 06 Jun 12:24 collapse

That’s a bit extreme. Just deleting files in a Live environment is super simple, and saves a big headache.

Dariusmiles2123@sh.itjust.works on 06 Jun 12:29 collapse

Well I’d love to be able to just do this, especially because every install is a big hassle on my Surface Go 1. Even booting from USB is, I don’t know why exactly… But what should I do once I manage to boot on the live USB?

just_another_person@lemmy.world on 06 Jun 14:06 collapse

Your disks should already be mounted, if not encrypted. If they aren’t, just go to whatever disk or partition manager you like, find the volumes, mount them, and go about finding large files you don’t need and delete them. Clear up a couple GB, then reboot your system as normal, and go about doing more cleanup until you’re happy. Super quick and easy.

_thebrain_@sh.itjust.works on 06 Jun 12:31 collapse

Fedora is systems, right? The easiest way to gain some (temporary) space is to clean out the journal and whatever logs you don’t need. It can grow quite big.

sudo journalctl --vacuum-size=100M

Will shrink it to something manageable. This will buy you some time to clean up until the journal grows again.

Also, clearing the apt cache will probably help free up some root partition space

sudo apt clean

Your root partition where packages are stored and all the logs and transactional databases might be full even if your home directory has tons of free space.

lemmyvore@feddit.nl on 06 Jun 12:36 collapse

I don’t think cleaning the apt cache will help on Fedora. 🙂 But the journal tip is good, just had a look at mine and it was a whole GB wasted.

_thebrain_@sh.itjust.works on 06 Jun 13:57 collapse

Duh… Fedora not Ubuntu/Debian/Et al.

sudo dnf clean

It’s been a while since I have run a redhat derivative… I think that was either the last iteration of mandrake or the first iteration of mandriva.

And the journal isn’t garbage persay, it’s a bunch of logs and whatnot that can be useful in certain diagnostics… Especially with op running all those snap packages. But in this case, clearing it is probably a better option then not clearing it