Posted on:January 8, 2018 at 06:53 PM

Tips to Clean Up Disk Storage

Tips to Clean Up Disk Storage

Find Duplicate Files

Use CCleaner to find duplicate files:

  1. Download and install CCleaner
  2. Go to Tools section
  3. Use the Duplicate Finder feature

Clean Up Existing Data Structure

# Remove empty directories
find . -type d -empty -delete

# Remove system files
find . -iname thumbs.db -delete
find . -iname .ds_store -delete
find . -iname ._* -delete
find . -iname desktop.ini -delete

Prevent .DS_Store File Creation

# Prevent .DS_Store creation on USB drives
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true

# Prevent .DS_Store creation on network drives
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true

This will create a file under ~/Library/Preferences/com.apple.desktopservices.plist. Once you have this configuration, .DS_Store files won’t be created on network and USB drives.