Skip to content

Commit 0cae2fe

Browse files
doc: update uninstall swiftly instructions (#338)
* doc: update uninstall swiftly instructions * doc: add punc & uninstall toolchain instructions * fix: update default location
1 parent bd30c05 commit 0cae2fe

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

README.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ swift --version
3232
--
3333
Apple Swift version 6.2-dev (LLVM 059105ceb0cb60e, Swift 714c862d3791544)
3434
Target: arm64-apple-macosx15.0
35-
Build config: +assertions
35+
Build config: +assertions
3636
```
3737

3838
For more detailed usage guides there is [documentation](https://swiftpackageindex.com/swiftlang/swiftly/main/documentation/swiftlydocs).
@@ -57,6 +57,25 @@ This command checks to see if there are new versions of swiftly itself and upgra
5757

5858
`swiftly self-update`
5959

60+
## Uninstalling swiftly
61+
62+
Currently, only manual uninstallation is supported. If you need to uninstall swiftly, please follow the instructions below:
63+
64+
NOTE: This will not uninstall any toolchains you have installed unless you do so manually with `swiftly uninstall all`.
65+
66+
1. (Optional) Remove all installed toolchains with `swiftly uninstall all`.
67+
68+
2. Remove any sections added by swiftly in your `.zprofile`, `.bash_profile`, `.profile`, or `fish/conf.d` files. These sections might look like this:
69+
70+
```sh
71+
# Added by swiftly
72+
. "/Users/<USERNAME>/.swiftly/env.sh"
73+
```
74+
75+
3. Remove the swfitly home and bin directories. The default location might be `~/.swiftpm` or `.local/share/swiftly`
76+
77+
4. Restart your shell and check you have correctly removed the swiftly environment.
78+
6079
## Contributing
6180

6281
Welcome to the Swift community!
@@ -77,7 +96,7 @@ Swiftly prior to verion 1.0.0 had a different installation and delivery mechanis
7796
To uninstall the old swiftly, first locate the swiftly home directory, which is often in `~/.local/share/swiftly` and remove it. Then check your shell profile files (`~/.profile`, `~/.zprofile`, `~/.bash_profile`, or `~/.config/fish/conf.d`) and remove any entries that attempt to source the `env.sh` or `env.fish` file in the swiftly home directory. Finally, remove the symbolic links that swiftly placed in your `~/.local/bin` to toolchain binaries (e.g. swift, clang, lldb, etc.). These will likely be symbolic links to toolchain directories in the swiftly home directory. Remove them so that there aren't any orphaned path entries.
7897

7998
Restart your shell and/or terminal to get a fresh environment. You should be ready to installing the new swiftly.
80-
99+
81100
## FAQ
82101

83102
#### Why not install Swift through the package manager (e.g. `apt` or `yum`)?
@@ -90,11 +109,10 @@ swiftenv is an existing Swift version manager which already has much of the func
90109

91110
- swiftly is being built as a community driven effort, and through this collaboration, swiftly is an official installation tool for Swift toolchains. swiftly has helped to inform the creation of API endpoints maintained by the Swift project that it uses to retrieve information about what toolchains are available to install and to verify their expected signatures. swiftenv currently uses a third party API layer for this. Using an official API reduces the avenues for security vulnerabilities and also reduces the risk of downtime affecting Swift installations.
92111

93-
- swiftly will be written in Swift, which we think is important for maintainability and encouraging community contributions.
112+
- swiftly will be written in Swift, which we think is important for maintainability and encouraging community contributions.
94113

95114
- swiftly has first-class support for installing and managing snapshot toolchains.
96115

97116
- swiftly has built in support for updating toolchains.
98117

99118
- swiftly is optimized for ease of installation. In addition, swiftly doesn't require any system dependencies to be installed on the user's system. While swiftenv is also relatively easy to install, it does involve cloning a git repository or using Homebrew, and it requires a few system dependencies (e.g. bash, curl, tar).
100-

0 commit comments

Comments
 (0)