xcutility is a tool to find and delete unused files from Xcode projects.
It recursively searches through a path to find all of the path’s Xcode projects and files, and will tell you which files are not referenced or built in any of your Xcode projects.
Installation
Using a pre-built package:
You can install xcutility by downloading xcutility.pkg from the
latest GitHub release and
running it.
Compiling from source:
You can also build from source by cloning this project and running
make install (Xcode 10.2 or later).
Quick Start
Find Swift files not referenced in any Xcode projects:
xcutility norefs --extensions .swift
Find Objective C files not referenced in any Xcode projects:
xcutility norefs --extensions .m,.h
Find Swift & Objective C files not referenced in any Xcode projects:
xcutility norefs --extensions .m,.h,.swift
Find Swift files not compiled in any Xcode projects:
xcutility unbuilt --extensions .swift
Find Objective C files not compiled in any Xcode projects:
xcutility unbuilt --extensions .m
Find Swift & Objective C files not compiled in any Xcode projects:
xcutility unbuilt --extensions .m,.swift
Usage
Help
$ xcutility help
Available commands:
all Find files that are not built or referenced in any Xcode projects
help Display general or command-specific help
norefs Find files that are not referenced in any Xcode projects
unbuilt Find files that are referenced in Xcode but not built in any build phases
version Display the current version of xcutility
Unreferenced Files
Find Files that are Unreferenced by any Xcode Projects in the Current Directory
xcutility norefs
Find Files that are Unreferenced by any Xcode Projects In a Specific Path
xcutility norefs --path ~/MySweetSweetApp/
Find Files With a Certain Extension that are Unreferenced by any Xcode Projects
xcutility norefs --extensions .swift
Find Only Files With Multiple Extensions that are Unreferenced by any Xcode Projects
xcutility norefs --extensions .swift,.h,.m
Find And Delete Files With Multiple Extensions that are Unreferenced by any Xcode Projects
xcutility
xcutility is a tool to find and delete unused files from Xcode projects.
It recursively searches through a path to find all of the path’s Xcode projects and files, and will tell you which files are not referenced or built in any of your Xcode projects.
Installation
Using a pre-built package:
You can install xcutility by downloading
xcutility.pkg
from the latest GitHub release and running it.Compiling from source:
You can also build from source by cloning this project and running
make install
(Xcode 10.2 or later).Quick Start
Find Swift files not referenced in any Xcode projects:
xcutility norefs --extensions .swift
Find Objective C files not referenced in any Xcode projects:
xcutility norefs --extensions .m,.h
Find Swift & Objective C files not referenced in any Xcode projects:
xcutility norefs --extensions .m,.h,.swift
Find Swift files not compiled in any Xcode projects:
xcutility unbuilt --extensions .swift
Find Objective C files not compiled in any Xcode projects:
xcutility unbuilt --extensions .m
Find Swift & Objective C files not compiled in any Xcode projects:
xcutility unbuilt --extensions .m,.swift
Usage
Help
Unreferenced Files
Find Files that are Unreferenced by any Xcode Projects in the Current Directory
Find Files that are Unreferenced by any Xcode Projects In a Specific Path
Find Files With a Certain Extension that are Unreferenced by any Xcode Projects
Find Only Files With Multiple Extensions that are Unreferenced by any Xcode Projects
Find And Delete Files With Multiple Extensions that are Unreferenced by any Xcode Projects
Find Unreferenced Files Verbosely
Find Unreferenced Files Combined Usage
Unbuilt Files
Find Files that are not built by any Xcode Project Build Phases in the Current Directory
Find Files that are not built by any Xcode Project Build Phases in a specific path
Find Files With a Certain Extension that are not built by any Xcode Projects Build Phases
Find Only Files With Multiple Extensions that are not built by any Xcode Projects Build Phases
Find And Delete Files With Multiple Extensions that are not built by any Xcode Projects Build Phases
Find Unbuilt Files Verbosely
Find Unbuilt Files Combined Usage
License
xcutility is released under the MIT license.