On an Ubuntu 16.04 install with a ton of hard drives, I am having a big issue.
I have a dataset I like to encrypt and copy to each hard drive every now and then.
The home folder is encrypted because I wanted to prevent the information being stolen if someone were to steal the drive.
So something really annoying happened.
For some reason the .Private folder has grown to 300gb. Which means I don’t leave me enough space for some operations. So what the heck.
I read it could’ve been caused by the trash not been cleaned, and I also deleted the contents of a .Trash folder. So far neither has worked.
So for reference, the drive is 500gb.
And right now I have 100gb of data. Why is there a 300gb .Private folder, when there is no Private (non-hidden) folder.
I am desperate. My disk is full. I can’t figure out whats wrong. At this point, it’s literally at 100%. But all there is, is my data and the daggum hidden Private folder. Which is clearly a lot more than my data.
I can totally empty my trash folder normally, the hidden trash folder seemed to be a way to fix this issue but it didn’t work for me. Basically my issue right now is that my this folder /.Private has 300gb. And it keeps growing. So I don’t know what to do. I think I have to put my data somewhere else, delete the folder, and see what happens. It doesn’t seem to be a lot of info about this on the internet.
.Private is actually all your data in your home folder. The unencrypted files you use every day are actually all stored in that .Private folder and transparently encrypted on the fly. That’s why your home (without .Private) should be as big as all your content in your home folder (maybe a few hundred or thousand KB difference).
You may see 100GB in your home and 100GB in .Private. This does not mean that you have 200GB used, but only 100GB. As the .Private folder is what is actually on your disk. The 100GB “unencrypted” data is not save on your storage device and file system, it is only decrypted on the fly.
If you want to get more space, just delete stuff in your home folder and Private will get smaller. Because Private is your home folder.
Here is the info I got from prodding around. I don’t think its useful. But at least it shows that .Private has far more space used than my whole folder combined.
404K
.config
278M
.dropbox
149M
.dropbox-dist
104G
total
38G
main_database
37G
Data
36K
.gnupg
30G
Dropbox
28K
Desktop
27M
.cache
26M
.mozilla
24K
.ICEauthority
24K
.bash_history
20K
.dbus
20K
.compiz
16K
.viminfo
16K
.oracle_jre_usage
12K
.xsession-errors.old
12K
.xsession-errors
12K
.Xauthority
12K
.wget-hsts
12K
.Trash-0
12K
.rnd
12K
.profile
12K
log
12K
.lesshst
12K
.gz
12K
gen_key.py
12K
.bashrc
12K
.bash_logout
12K
backup_.sh
8.0K
wat.txt
8.0K
.sudo_as_admin_successful
4.0K
stage
4.0K
.ssh
4.0K
.Private
4.0K
.gconf
4.0K
.ecryptfs
2.7M
.local
However, from dh -h this is all I get
size / used / available/ use%/ mounted on
/dev/sdf1/ 451G 402G 27G 94% /
/home/manager/.Private 451G 402G 27G 94% /home/manager
Ok I managed to solve this. It was doing something very dumb. For some reason, out of nowhere the .Private folder was also adding files from mounted drives in my system at random.
Do you have mounted drives? The issue was that I had a mounted drive with lots of data. That data was being encrypted and being added to the .private folder such that the drive was encrypted as well. This of course is not intended since I only wanted to have the home folder encrypted in case someone steals the hardware. I am not sure what fixed it, I just deleted lots of data and remounted the drive. Maybe try not mounting anything inside the home folder.
I’ve got some docker processes that mount drives in home, so I think they are being added to ~/.Private. I’m not sure how to remove them from ~/.Private after I’m done using them.
I had the same problem recently. It seems it was related to Docker containers. I found the following command which worked great.
docker ps -a --filter status=exited --quiet | xargs docker rm