Server talking up unnecessary amount of space ?

3 posts / 0 new
Last post
#1 Fri, 10/05/2018 - 11:06
Kivylius
Kivylius's picture

Server talking up unnecessary amount of space ?

Dear All.

I have a small vps that I run a few domains on. Its 20gb of space and used is about 12gb. Doing some investigating. I ran the du command on the /

This return me a few results but main ones to focus on is;

236M    /y
1.3G    /boot
1.7G    /usr
2.1G    /home
2.2G    /var
4.8G    /lib

What is the /y dir? but more importantly /lib is 4.8gb, looking deeper the /lib/modules was 4.3gb, going into that and running the du comand returned me this;

42M     /lib/modules/4.4.0-22-generic
42M     /lib/modules/4.4.0-38-generic
42M     /lib/modules/4.4.0-42-generic
42M     /lib/modules/4.4.0-45-generic
42M     /lib/modules/4.4.0-47-generic
44M     /lib/modules/4.4.0-51-generic
44M     /lib/modules/4.4.0-53-generic
51M     /lib/modules/4.4.0-57-generic
51M     /lib/modules/4.4.0-59-generic
51M     /lib/modules/4.4.0-62-generic
53M     /lib/modules/4.4.0-109-generic
53M     /lib/modules/4.4.0-63-generic
53M     /lib/modules/4.4.0-64-generic
53M     /lib/modules/4.4.0-66-generic
53M     /lib/modules/4.4.0-67-generic
53M     /lib/modules/4.4.0-83-generic
209M    /lib/modules/4.4.0-70-generic
209M    /lib/modules/4.4.0-71-generic
209M    /lib/modules/4.4.0-72-generic
209M    /lib/modules/4.4.0-75-generic
209M    /lib/modules/4.4.0-77-generic
209M    /lib/modules/4.4.0-78-generic
209M    /lib/modules/4.4.0-79-generic
209M    /lib/modules/4.4.0-87-generic
209M    /lib/modules/4.4.0-89-generic
209M    /lib/modules/4.4.0-91-generic
209M    /lib/modules/4.4.0-92-generic
209M    /lib/modules/4.4.0-93-generic
209M    /lib/modules/4.4.0-96-generic
209M    /lib/modules/4.4.0-97-generic
209M    /lib/modules/4.4.0-98-generic
213M    /lib/modules/4.4.0-135-generic
213M    /lib/modules/4.4.0-137-generic

I tried clearing the old modules with a sudo apt-get autoremove --purge but it gets stuck in a infinite loop keep listing all the files, removing and the listing and removing. Anyone know what the cause of this? Does virtual min just prevent the deletion of these files or is it just run really slowly as I left it run for about 10 minutes and then just shutdown ssh channel.

Thanks

Fri, 10/05/2018 - 11:25
andreychek

Howdy,

Virtualmin doesn't do anything that would prevent packages from being removed... it's just a web service that runs on your server.

The Virtualmin installer (the install.sh script) just installs dependencies using "apt-get install PACKAGE_NAME". If you were to try removing a dependency, you could certainly remove it with "apt-get remove VIRTUALMIN_DEPENDENCY". It might break Virtualmin, but it won't prevent you from doing it :-)

So if you're seeing issues with packages, it sounds like something else is going on.

It looks like you have a lot of kernel related files/packages there.

I've seen those take quite some time to remove, but a way to see if it's working properly would be to try removing just one rather than all of them.

That is, find one older kernel package that you no longer need, and remove it with 'apt-get remove OLD_KERNEL_PACKAGE`. What happens in that case?

-Eric

Sun, 10/07/2018 - 17:46
jafinn

A small tip, disconnecting an SSH session will terminate the running command. If you need to run long commands and don't want to wait for them to finish, have a look at GNU screen (sudo apt-get install screen).

Aborting while apt is doing stuff might very well leave you with broken packages.