2021/July 2021

How to prevent GoogleDrive from taking so much of your local storage

hajinny 2021. 7. 26. 17:26

So recently, I've tried to transfer my videos and photos to my google drive, because it felt like storing things on the cloud is much more reliable and convenient than storing it in a disk which, frankly, you don't know when it would break. Theoretically, a disk usually lasts for 3-5 years. Even with a good technology like RAID that keeps redundant copy as a proof against disk failure, the lifespan is not lengthened indefinitely and you don't know when it would break.

 

I'll post how I managed to get my files uploaded very easily using bash, but this is a comment on how to deal with these annoying storage issues that rise up as you upload your stuff onto the cloud through desktop Google Drive client.

 

Solution is so simple that you might not even have tried: just sign out, then sign in again (if you want)

In other words, just press that 'Quit' button

Make sure that under the Preference, stream files option is selected:

 

Then I got this:

Fudge, do you see that 'Other' storage?

Becoming this:

This is after that signout then sign in 

The conclusion to draw here is that, when you use Google Drive client to upload files, you have all those files also stored in your local storage as 'Other' space. This is hella annoying, because I was pretty sure I selected an option of 'Stream files' which should automatically mean that you don't store any files that is in the Google Drive. It turns out that whatever file you open gets stored as 'Other' storage, so make sure to sign out and sign in of the Google Drive client to make sure no unnecessary files are taking your disk space!

 

Okay we've fixed the issue, but where's some fun coding stuff? Surely you've tried using your software knowledge to figure this out!

- well, I tried. One thing I tried was to change directory to Google Drive remote storage and just find the size of that directory to see if the uploaded files are being synced.

 

But how do you estimate the size of the contents of the folder? - It's so easy!

du -sh <directory>

Windows users would be like, why would you even use bash to do that. But in Unix system, each directory is a file, and they only have pointers to its children directories/files (which means it in itself doesn't contain files). So the bash command above traverses through the folder and calculates the size of the contents inside one folder for you!

 

But before I used that tool properly, I realized that the problem was gone. So, lol.