Using Terminal to find out what's eating your disk space.

How To: Using Terminal to find out what’s eating your disk space

Tech How-To Troubleshooting How To: Using Terminal to find out what’s eating your disk space
By James Hart | Posted in Troubleshooting

You can use Terminal as a quick way to find out what specifically is taking up disk space on your hard disk (other solutions such as DaisyDisk are available but require you to download, install and sometimes purchase).

  1. Open Terminal
  2. At the prompt type the following:  cd /
  3. Press return. Your Terminal is now at the top level of the hard disk.
  4. Type the following followed by return:   du -h -d2

This command runs a du (disk usage) command with -h (human readable output) and goes down -d2 (two folder levels down).

You will now see a list of every folder from the top of the disk and down 2 folder levels, with the size of each folder denoted in K,M,G or T (for kilobytes, megabytes, gigabytes or terabytes).

Each folder will also show its total size calculated at the bottom of each section of results.

Variations:

You can use “cd” to navigate to a different starting point, for example you might only be interested in what’s taking up all the space in your own ~/Documents folder.

You can also use something like:  du -h -d1  to only look at the current level, or -d3 to go 3 levels down instead.

Common Culprits:

The ~/Library folder for a given user is often quite large due to the email cache.

Likewise /Applications and ~/Downloads are common sources of data.

Generally speaking, the bulk of data on a computer is going to be within the User folders located at /Users

Real-Time Feedback

When we solve a support ticket, clients are given the choice of leaving good or bad feedback along with an optional comment. We post the 10 most recent comments here automatically and in real-time. You can view even more on our reviews page.

Date Name Comments
Dec 3rd Simon D Always quick and successful. Thanks.
Nov 22nd James A James Did a great job getting me back up and running. Thanks
Nov 21st Tracy N Very quick response and early resolution. Thank you
Nov 21st Justin Superb response, fast and effective as always, many thanks James!
Nov 19th Mathias D My issues was treated very quickly. Very pleased with the service.
Nov 13th Sue T Excellent service and very prompt.
Nov 13th Craig B The quality of support recieved was fantastic again, They got back to me in good time, I have spoken to a couple of different people in the company and I must say the communication is great within the company. Thanks again James Hart for a brilliant set up.
Nov 11th george.... Prompt, polite and gave us confidence. Thanks
Nov 6th Darryl A Good job. Thanks
Oct 25th Debbie H Always helpful