[Solved?] rm not freeing space, even after reboot?

2 days ago by OwOarchist to c/linuxquestions

My girlfriend managed to fill 100% of her / partition on Ubuntu, and now it won't boot.

I can get into recovery mode and get a root console, and I've already used rm to delete several large files from her downloads directory, but the problem persists, even after several reboot attempts. ls no longer shows those files in the directory, and it should have freed up plenty of space to at least boot, but it's still not booting, and when I try to use the recovery mode option of 'fix broken packages', dpkg tells me it can't complete the action because it doesn't have the required ~250MB of free disk space. But, again, I just used rm to delete several hundred GB of files. That should be more than enough, but it's like the space isn't being freed up somehow. And, to be clear, I've done several hard reboots after deleting these files, still getting the same results. du -h does show her / partition at 100% usage, even after these deletions. (And the /boot partition is only at 49% full, so that shouldn't be an issue.)

Is there some command I need to use to get it to rescan and realize that it actually has free space now?

How much free disk space should Ubuntu actually need in order to boot, anyway?

Am I barking up the wrong tree entirely somehow? Booting always proceeds as normal right up until the moment the GUI desktop should load, and then it's replaced by a single blinking underscore in the top left corner -- it briefly shows any text typed in, not long enough to actually enter any command, but otherwise doesn't respond to anything I've tried other than Ctrl+Alt+Del, which reboots it. I've been pursuing this free disk space problem because the only unusual thing she did before this problem started is that she downloaded a lot of videos and filled the disk completely.


Edit:

No, the /home and / directories were on the same partition, so that wasn't the issue.

Okay, so I managed to get it to boot, I guess? For the possible reference of others, here's what I did:

1: Used rm to delete even more things from her download folder. Deleted a lot of stuff. The ls -lS | less command helped here, to quickly identify the biggest, most space-hogging files. I basically just deleted the 10 biggest files before trying again. (After already having deleted some of the other big files in there.)

2: I used exit to go back to the recovery mode menu, then chose the option to resume normal boot. That once again brought me to the dreaded blinking underscore and nothing else.

3: As some here suggested, I then used the Ctrl + Alt +F3 key combination ... and that just magically fixed everything. As soon as I hit that key combo, the screen flickered for a bit with weird graphical glitches straight out of a Cyberpunk hacking scene, and a moment later, it was suddenly fully booted into the normal desktop GUI.

At this point, I think I'm going to declare it 'fixed' and not fuck around with it any further -- I don't want to risk making things worse and losing this progress. Still not sure what actually happened, but it's working for now, and I'm a big believer in "If it ain't broke, don't fix it." Now that she has a GUI to work with, I'll ask her to move more of her downloaded files to an external drive, and I'll work on it further if and when something goes wrong again.

Thank you to everyone who offered suggestions and tried to help!

ryannathans 11 points 2 days ago

Are you using a CoW or snapshotting filesystem like zfs or btrfs? Blocks won't be deleted until all snapshots referencing them are deleted

path: 0 26391834, hotness: undefined, score: 11, children: 2
GenderNeutralBro 3 points a day ago

This, plus there could be deduplication of live files. I don't know if Ubuntu does this by default but some distros do, with duperemove or similar tools.

path: 0 26391834 26398880, hotness: undefined, score: 3, children: 0
OwOarchist 2 points a day ago

No, nothing unusual like that. Pretty sure it's on ext4.

It's fixed for now (see edits to main post), so I'll stop messing with it.

path: 0 26391834 26400306, hotness: undefined, score: 2, children: 0
Culminate 10 points 2 days ago

Is her home directory on a different partition? Run lsblk -f to show the partitions. Otherwise that is weird that the deletions are not removed. Are her Downloads deleted?

path: 0 26391813, hotness: undefined, score: 10, children: 1
OwOarchist 1 point a day ago

Same partition, and when I look at the downloads folder with ls, it no longer shows the deleted files there.

It’s fixed for now (see edits to main post), so I’ll stop messing with it.

path: 0 26391813 26400319, hotness: undefined, score: 1, children: 0
nonentity 8 points 2 days ago

The most obvious next step is to run fsck over the partition in recovery/single user mode.

path: 0 26391793, hotness: undefined, score: 8, children: 1
OwOarchist 1 point a day ago

It’s fixed for now (see edits to main post), so I’ll stop messing with it.

path: 0 26391793 26400320, hotness: undefined, score: 1, children: 0
hperrin 5 points a day ago path: 0 26398169, hotness: undefined, score: 5, children: 1
OwOarchist 2 points a day ago

Yes, same partition.

But it's fixed for now (see edits to main post), so I'll stop messing with it.

path: 0 26398169 26400277, hotness: undefined, score: 2, children: 0
MyNameIsRichard 4 points 2 days ago

Booting always proceeds as normal right up until the moment the GUI desktop should load, and then it’s replaced by a single blinking underscore in the top left corner

That suggests to me that it is booting but is having trouble starting the graphical target. Try dropping to a tty by pressing Ctrl + ALt + F4, logging in, and examining the logs to see what's going on.

path: 0 26393862, hotness: undefined, score: 4, children: 1
OwOarchist 1 point a day ago

Ctrl + ALt + F4 didn't seem to do anything at all, but Ctrl + Alt + F3 instantly fixed everything.

It’s fixed for now (see edits to main post), so I’ll stop messing with it.

path: 0 26393862 26400446, hotness: undefined, score: 1, children: 0
fraksken 4 points 2 days ago

Look in / var/logs usually quite a bit of logs thete to remove. A few meg should be enough to boot. du -sh to see how large a directory is, including subdirs

path: 0 26393714, hotness: undefined, score: 4, children: 1
OwOarchist 3 points a day ago

It's fixed for now (see edits to main post), so I'll stop messing with it.

path: 0 26393714 26400297, hotness: undefined, score: 3, children: 0
RedGreenBlue 4 points 2 days ago

The download folder and your home folder might not be in your root partition. It is common to separate home and root in different partitions. check: df -h / /home if you see sda1 and sda2(different numbers), they are separate partitions. An nvme disk might look different: nvme1n1p1. Last number is partition. You'll see how full it is here too.

Once you acctually know it's a full root partition, I would get gparted live disk and extend the root partition a little. This is the lasting fix.

Your description makes it sound like it's actually booting. When the prompt is on screen, switch to another tty (ctrl+alt+F3) and clear your package cache, which can restore allot of space sometimes, or uninstall some large package you don't need.

You don't need much space on root to boot. Once you confirmed that there is at least a little space on your root, I would investigate a failing graphical enviroment, I would, again, switch tty and do a full update and reinstall graphical drivers and reboot. Worst case scenario, your GPU is breaking.

path: 0 26394753, hotness: undefined, score: 4, children: 1
OwOarchist 2 points a day ago

switch to another tty (ctrl+alt+F3)

Still not sure what exactly this did, but that one key combination seems to have magically fixed it. (See edits in original post.)

path: 0 26394753 26400289, hotness: undefined, score: 2, children: 0
linuxquestions
linuxquestions

@lemmy.zip

login for more options
4272
312
210

Linux questions Rules (in addition of the Lemmy.zip rules)

  • stay on topic
  • be nice (no name calling)
  • do not post long blocks of text such as logs
  • do not delete your posts
  • only post questions (no information posts)

Tips for giving and receiving help

  • be as clear and specific
  • say thank you if a solution works
  • verify your solutions before posting them as facts.

Any rule violations will result in disciplinary actions

go to feed...