Letsencrypt using 40GB of disk space? [Solved]

I set up Letsencrypt on my ubuntu web server a few days ago. Everything has ben working fine but today my server is warning that I’m using up 100% of my 40GB HDD.

Below is the output of a du command and it shows that it’s letsencrypt using up all this space. I can’t work out why though.

Has anyone else experienced this before and know how to fix it?


~$ du -a | sort -nr | head
39620 .
39512 ./.local
39508 ./.local/share
39504 ./.local/share/letsencrypt
36156 ./.local/share/letsencrypt/lib
36152 ./.local/share/letsencrypt/lib/python2.7
35772 ./.local/share/letsencrypt/lib/python2.7/site-packages
7580 ./.local/share/letsencrypt/lib/python2.7/site-packages/pip
6460 ./.local/share/letsencrypt/lib/python2.7/site-packages/pip/_vendor
4548 ./.local/share/letsencrypt/lib/python2.7/site-packages/cryptography

Hello @JohEngstrom,

Could you please show the result of this command?

du -hs ~/.local/

Because I’m afraid Let’s Encrypt is not guilty for your space issue ;).


1 Like

Hi @sahsanu thank for your reply!

Here’s the result of that command:

$ sudo du -hs ~/.local/
39M /home/brigante/.local/

@JohEngstrom, so, as you can see Let’s Encrypt is not filling your disk :wink:

@sahsanu Thanks again for your help!

If I cd into this directory though there’s a share directory and inside that a letsencrypt directory.

If I do the following

$ du -hs ~/.local/share/letsencrypt
39M /home/brigante/.local/share/letsencrypt

It still looks like it’s Letsencrypt that is the culprit or am I missing something?

@JohEngstrom, du -hs command shows the output in a summarize way (-s) and in a human readable format (G for GigaBytes, M for MegaBytes, K for KiloBytes…) with option (-h)

So, du -hs ~/.local/ will show the size of .local dir an all sub-dirs and it is 39 MegaBytes so it is not filling your disk.

1 Like

That directory is using 39 MB of storage. You probably want to run du -a / | sort -nr | head to look at your whole file system, and not just your current working directory.

Thanks @pfg and @sahsanu. That makes sense now!

Unfortunately I can’t run the command @pfg suggested as I just get a No space left on device warning.

Must be a log file somewhere I’m guessing!

Thanks for your help guys! It seems it was the server backup log that was going crazy.

Sorry for wasting time!!

1 Like

@JohEngstrom, this is totally off topic but try to remove first some files on /tmp/ and or /var/tmp/ to free some space so you could launch the proposed commands.

Also check the output of df -h and df -i.

Thanks @sahsanu I sorted it. It was the log file. I had to delete it and reboot to get the space back.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.