Cut the Clutter: Test Ignore Files Feature - sign up to become a beta tester here.

Forum Discussion

esmewang's avatar
esmewang
Explorer | Level 3
2 years ago

Find and delete all empty files

Because of a problem I had with data transfer a while back, I now have hundreds of empty files in Dropbox. When I tried to find and delete them all in Terminal, I can't because of a lack of permission. How can I find and delete all empty files in my Dropbox account?

10 Replies

  • Jay's avatar
    Jay
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    2 years ago

    Hi esmewang, thanks for bringing this to our attention.

     

    Are the files visible on the Dropbox site or the Dropbox folder?

     

    Is the Dropbox desktop application currently installed an running on your machine?

     

    This will help me to assist further!

  • esmewang's avatar
    esmewang
    Explorer | Level 3
    2 years ago
    Hi—the answer is yes to all of those questions.

    Thank you!
  • Jay's avatar
    Jay
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    2 years ago

    Thanks for the info. Are you able to delete the empty files from the Dropbox site directly?

  • esmewang's avatar
    esmewang
    Explorer | Level 3
    2 years ago

    Yes, I can delete them one by one. The problem is that I have hundreds of these, and I can only find out if a file has zero bytes by clicking on it, which is why I was trying to do it in Terminal. 

  • Megan's avatar
    Megan
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    2 years ago

    Hey esmewang, sorry to jump in here! 

     

    The safest way to go on about it would be either through the app, or through the website. As for the terminal, what kind of error do you get on your end when you try? 

  • esmewang's avatar
    esmewang
    Explorer | Level 3
    2 years ago

    When I try and do this through Terminal: 

     

    /users/***/dropbox find -type f -empty -print (so that I can see and then delete them)

     

    I get this message:

     

    zsh: access denied: /users/***/dropbox

     

     

     

     

  • Megan's avatar
    Megan
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    2 years ago

    Hi esmewang, you could also try to sort your files by Size.

     

    That way you'll be able to locate all your 0kb files faster, and then delete them. 

  • esmewang's avatar
    esmewang
    Explorer | Level 3
    2 years ago
    But this is still a process that would mean going through my hundreds of Dropbox folders and sorting them by size. Is there a shortcut to this? A code or an app or something that deletes empty files?
  • Megan's avatar
    Megan
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    2 years ago

    Hi esmewang, on our end there isn't, but I'll definitely keep this thread open.

     

    That way, if any other user has any suggestions, or third-party apps that can do this, they can share them with you.

     

    Thank you!

About Delete, edit, and organize

Solve issues with deleting, editing, and organizing files and folders in your Dropbox account with support from the Dropbox Community.

Need More Support

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!