You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: FAQ.md
+35-11Lines changed: 35 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,11 +17,12 @@ _If you don't find what you're looking for, and you think it should be covered b
17
17
-[How do I install Zsh on Windows?](#how-do-i-install-zsh-on-windows)
18
18
-[How do I install Oh My Zsh?](#how-do-i-install-oh-my-zsh)
19
19
-[How do I install Oh My Zsh globally?](#how-do-i-install-oh-my-zsh-globally)
20
+
-[How do I update Oh My Zsh?](#how-do-i-update-oh-my-zsh)
21
+
-[How do I manually update Oh My Zsh from a script?](#how-do-i-manually-update-oh-my-zsh-from-a-script)
20
22
-[How do I uninstall Oh My Zsh?](#how-do-i-uninstall-oh-my-zsh)
21
23
-[How do I change my locale?](#how-do-i-change-my-locale)
22
24
-[How do I reload the zshrc file?](#how-do-i-reload-the-zshrc-file)
23
25
-[How do I reset the completion cache?](#how-do-i-reset-the-completion-cache)
24
-
-[How do I manually update Oh My Zsh from a script?](#how-do-i-manually-update-oh-my-zsh-from-a-script)
25
26
-[Common problems](#common-problems)
26
27
-[Installation](#installation)
27
28
-[I can't access the installer / connection timed out](#i-cant-access-the-installer--connection-timed-out)
@@ -129,6 +130,39 @@ plugins=(...)
129
130
source"$ZSH/oh-my-zsh.sh"
130
131
```
131
132
133
+
#### How do I update Oh My Zsh?
134
+
135
+
Oh My Zsh automatically updates itself if left at the default settings. You can check out [[Settings]] for more information on how to change the update settings.
136
+
137
+
If you want to manually update Oh My Zsh, you have 2 options:
138
+
139
+
- If running within your shell, you can use the CLI tool `omz` to force an update and restart the shell session:
140
+
141
+
```sh
142
+
omz update
143
+
```
144
+
145
+
- If you want to update Oh My Zsh as part of an automated script, its better to use the `upgrade.sh` script directly. You can call it with any of these alternatives:
146
+
147
+
```sh
148
+
"$ZSH/tools/upgrade.sh"# $ZSH needs to be defined within the script
149
+
zsh "$ZSH/tools/upgrade.sh"
150
+
/path/to/ohmyzsh/tools/upgrade.sh
151
+
```
152
+
153
+
This script also allows you to pass in 2 separate flags to control its behavior:
154
+
155
+
-`-i`: tells the script to upgrade interactively. In this mode, the only change is that the changelog will be displayed after the update.
156
+
-`-v default|minimal|silent`: control the verbosity of the script. This is equivalent to the [verbosity](https://github.com/ohmyzsh/ohmyzsh/wiki/Settings#omzupdate-verbosity) settings.
157
+
158
+
> [!IMPORTANT]
159
+
> To upgrade Oh My Zsh, you need to have `git` installed and it needs to be installed as a git repository.
160
+
> It is also required to be running with a user that has write access to the Oh My Zsh installation directory.
161
+
162
+
#### How do I manually update Oh My Zsh from a script?
163
+
164
+
See [the section above](#how-do-i-update-oh-my-zsh).
165
+
132
166
#### How do I uninstall Oh My Zsh?
133
167
134
168
To remove Oh My Zsh, run `uninstall_oh_my_zsh`. The uninstaller will:
@@ -215,16 +249,6 @@ rm "$ZSH_COMPDUMP"
215
249
exec zsh
216
250
```
217
251
218
-
#### How do I manually update Oh My Zsh from a script?
219
-
220
-
The best way to do that is to call the `upgrade.sh` script directly. If `$ZSH` is defined (it should point to where OMZ is installed), then you can call it like so:
221
-
222
-
```sh
223
-
"$ZSH/tools/upgrade.sh"
224
-
```
225
-
226
-
Another option is to use the `omz` CLI. The `omz update` command triggers an update, but it also shows the changelog and restarts the zsh session (which _might_ cause a restart loop). To avoid that, run it with the `--unattended` flag, like so: `omz update --unattended`. But again, it's better to call the `upgrade.sh` script directly.
0 commit comments