Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
completely remove all xcode files
#!/usr/bin/env ruby
cancer_in_home = [
"Library/Developer",
"Library/Preferences/com.apple.dt.*",
"Library/Caches/com.apple.dt.*",
'Library/Application\ Support/Xcode'
]
cancer_in_root = [
"/Library/Preferences/com.apple.dt.Xcode.plist"
]
def remove(path, sudo=false)
sudocmd = if sudo
"sudo "
else
""
end
`#{sudocmd}rm -rf #{path}`
puts "#{path} nuked"
end
for home_path in cancer_in_home do
remove("$HOME/#{home_path}")
end
for path in cancer_in_root do
remove(path, true)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment