https://github.com/brokenhandsio/swiftpm-cleanup
Script to cleanup SwiftPM environments
https://github.com/brokenhandsio/swiftpm-cleanup
Last synced: about 1 year ago
JSON representation
Script to cleanup SwiftPM environments
- Host: GitHub
- URL: https://github.com/brokenhandsio/swiftpm-cleanup
- Owner: brokenhandsio
- Created: 2023-10-30T18:52:29.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-06T12:00:06.000Z (over 2 years ago)
- Last Synced: 2025-04-20T13:03:46.372Z (about 1 year ago)
- Language: Swift
- Size: 5.86 KB
- Stars: 16
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SwiftPM Cleanup
A simple tool to clean up your SwiftPM project's environment.
It will remove:
- `.build`
- `.swiftpm`
- `Package.resolved`
- `/your/home/directory/.swiftpm`
- `/your/home/directory/Library/Caches/org.swift.swiftpm`
Optionally, by passing the `--clean-derived-data` flag, it will also remove:
- `/your_home_directory/Library/Developer/Xcode/DerivedData/your_project`
If you want to specify a project other than the one in the current directory, use the --path option:
- `--path /path/to/your_project`
## Usage
- Clone the script file into your project's directory
- Run it with
```bash
swift cleanup.swift [--path /path/to/your_project] [--clean-derived-data]
```
> [!WARNING]\
> Make sure to:
> - Run it as normal user and not as root, as that will switch your home directory to `/var/root`
> - Close any IDE or editor that might be using the project's files, as that will result in permission issues