Why is the size of my .Private folder so large?

11,737

Solution 1

Since its contents are encrypted, you are unlikely to be able to tell much by looking at the files in ~/.Private directly.

Instead, you'd be better off looking at the unencrypted view of those same files in ~/Private. The ecryptfs system has quite a low overhead, so if ~/.Private is large it is likely because you've placed a lot of data in ~/Private (or a program running on your behalf has done so).

Solution 2

I just went through a similar situation on Ubuntu 16.04. Not having ever set up the ~/Private folder, but with the ~/.Private folder taking up 90% of disk space available. In my case I had enabled the /home folder encryption option during install; it seems that in such case the ~/.Private folder is set up automatically for the purpose. You can verify it, if the ~/.Private folder is a link to /home/.encryptfs this is most likely the case:

$ ll ~/.Private
lrwxrwxrwx 1 user user 33 nov  1 16:25 /home/user/.Private -> /home/.ecryptfs/user/.Private/

I do not know exactly what causes this expansion of the encrypted file system, but it is basically the ~/.Trash folder. I just needed to empty the Trash in the DE to bring things back to normal. I suspect that when single files are removed from the Trash they somehow remain in the encrypted file system; emptying the Trash fixes this.

Note that it may take several minutes for the system to report the correct space usage after the Trash is emptied.

Share:
11,737

Related videos on Youtube

Adi
Author by

Adi

Updated on September 18, 2022

Comments

  • Adi
    Adi almost 2 years

    Last night I had about 190GB of free space on my 500GB HDD. Today I have about 80GB free. I ran df and discovered that my /home/jon/.Private folder is currently using 80% of my hard drive.

    What. The. Hell.

    I really don't need to encrypt my files that bad. Can anyone tell me why I've lost so much space to this, and what I can do to recover as much free space as possible?

    I realize that I'm not going to get back 330-something odd GB of space, but I lost 100GB overnight. I'm new enough to Ubuntu (and Linux in general) that I don't want to proceed without a firm understanding of what's going on here.

    Thanks in advance, guys.

  • Adi
    Adi over 12 years
    I'm currently not using that environment since I noticed that my free space was steadily diminishing so I can't check directly, but I could swear that I don't actually have a ~/Private directory. Is that even possible or am I just missing the obvious?
  • Adi
    Adi over 12 years
    Yep, I'm back in Ubuntu and there is no ~/Private. What does that mean?
  • James Henstridge
    James Henstridge over 12 years
    Is it possible that you deleted the ~/Private directory at some point? That wouldn't have cleared the encrypted files found within. Assuming the key also hasn't been removed, you could try running mkdir ~/Private followed by ecryptfs-mount-private in a terminal might be enough to regain access.
  • Adi
    Adi over 12 years
    ecryptfs-mount-private did not restore anything to ~/Private after I created the directory. Using sudo ecryptfs-mount-private prompted me for my passphrase. Thankfully (and totally by accident) I remember my passphrase, but after entering it I get an error: fopen: No such file or directory.
  • Hoàng Long
    Hoàng Long over 5 years
    I second this. Emptying the trash clear me 1.5 GB+ of data that is impossible to clear otherwise
  • Paul
    Paul about 4 years
    What is the DE?