Over the past year I have been learning about Linux. Having always been a Windows guy, this has been a bit different, but it has been a fun challenge. I’m really enjoying learning to use the Command Line Interface more and more. BUT, I have always found that I truly learn better when techie things don’t go right, and I then have to dig in to figure out what is happening. Aaaaaand here is how we come to our story today…
Last night I was trying to install a Docker container for OpenVAS to work on a lab, but something wasn’t working right and I couldn’t open the application. So I tried to uninstall the container and Docker. But Docker wouldn’t uninstall. It went through the process and then it said there wasn’t enough room to complete the uninstall. I know, this sounds odd, but sometimes we need MORE room to uninstall something before we ultimately get rid of the application. Hmmm, why is it telling me that there isn’t enough room??? I know I had 200+GB of free disk space.
So I start digging and it turns out that my “/dev/machine_name/root” and “/dev/machine_name/var” folders are full. Odd.
Thinking that perhaps I might have temp files messing things up, I rebooted. And then things got really squirrely. My laptop went through the boot process but stopped at a black screen with only a flashing cursor in the top left of the screen. Hmmmm, now what do I do? I pressed CTRL-ALT-FUNC-F2 and was able to get to a login screen. I logged in and typed “startx” to see if I could get a GUI. Well, I got a GUI, but it only showed one window and wasn’t functional. I rebooted again to see if that would help. It didn’t. š
This time after the reboot I got distracted with other things and waited a while before trying to start the GUI, and it worked. Now that was interesting. Back in full control of my laptop, I was feeling just a tad bit better. But I wasn’t sure what was going on.
I was able to do some searching and found this nifty command to figure out the available disk space.
sudo du -ksh * | sort -rh | more
du= disk usage
-k= block size
-s= summarize
-h= human readable
*= all files and folders
sort -r= reverse
sort -h= human readable numbers
more= print text to fill screen, then wait for space bar to show more
Running that in the “/var/lib” folder I found a 7GB Docker folder. I am not sure why I did it, except that I knew I was trying to get rid of the Docker installation, so I deleted the Docker folder. Then I looked at the size of the “/dev/machine_name/root” and “/dev/machine_name/var” folders again, and they had shrunk!!! The “/dev/machine_name/var” shrunk about 7GB. Well isn’t this interesting. š
Now I was able to uninstall and install things again as well as reboot and get back into the GUI automatically.
It seems that by installing the Docker container it filled my root and var folders in my user profile preventing me from uninstalling or installing anything, as well as booting into my user profile.
I know I still have to learn more about why it installed like that and what I can do in the future to direct how it installs, so my root isn’t full. But for now I am SOOOO happy to have my laptop back and I didn’t have to reinstall the OS.
Happy Penguining!!!
Robba