Ubuntu – `/home/.ecryptfs` and why does it take up so much space

ecryptfs

I'm trying to clean up my home directory to make space, and I ran du on /home with the following results:

kylrth@kylrth: ~$ du -a /home | sort -n -r | head -n 10
du: cannot read directory '/home/kylrth/.cache/dconf': Permission denied
du: cannot read directory '/home/.ecryptfs/kylrth/.Private/ECRYPTFS_FNEK_ENCRYPTED.FWZZRYUrNfRnNUTSMYdF2YnEmQUuSeE1Qy6JiqKkUaMvOKANZXamTsFCyk--/ECRYPTFS_FNEK_ENCRYPTED.FWZZRYUrNfRnNUTSMYdF2YnEmQUuSeE1Qy6Jn2nSPLgFTcWlfhNrElk3Pk--': Permission denied
208927300   /home
104467000   /home/.ecryptfs
104466996   /home/.ecryptfs/kylrth
104466976   /home/.ecryptfs/kylrth/.Private
104460296   /home/kylrth
45822400    /home/kylrth/programming
45822400    /home/.ecryptfs/kylrth/.Private/ECRYPTFS_FNEK_ENCRYPTED.FWZZRYUrNfRnNUTSMYdF2YnEmQUuSeE1Qy6JmGvjsCCj5Bma9vNbFUrDzk--
43557124    /home/kylrth/programming/data_project
43557124    /home/.ecryptfs/kylrth/.Private/ECRYPTFS_FNEK_ENCRYPTED.FWZZRYUrNfRnNUTSMYdF2YnEmQUuSeE1Qy6JmGvjsCCj5Bma9vNbFUrDzk--/ECRYPTFS_FNEK_ENCRYPTED.FWZZRYUrNfRnNUTSMYdF2YnEmQUuSeE1Qy6JJKIgGp1tJBy.    Pofhu9e6uE--
43556676    /home/kylrth/programming/data_project/data

What is ecryptfs and why do its files take up so much space? Can I remove them?

Best Answer

/home/.ecryptfs/user is where your encrypted home files are actually kept.

/home/user is just a virtual mountpoint for the decrypted versions of your files; it takes up no real on-disk space.

Deleting files in one place will delete the corresponding files in the other. Since you've likely got filename encryption enabled, it won't be obvious what the files in the .ecryptfs folder are, so only delete files from /home/user .