# Install Unsloth on MacOS

To install Unsloth locally on your local Apple MacOS device, follow the steps below:

### Install Unsloth

```bash
curl -fsSL https://unsloth.ai/install.sh | sh
```

Use the same command to update or use `unsloth studio update`.

### Launch

Every time you want to launch Unsloth again:

```bash
unsloth studio -H 0.0.0.0 -p 8888
```

For detailed Unsloth Studio install instructions and requirements, [view our guide](https://unsloth.ai/docs/new/studio/install).

### Uninstall

To uninstall Unsloth Studio on macOs, follow these 4 steps:

#### **1. Remove the application**

* MacOS, Linux: `rm -rf ~/.unsloth/studio/unsloth ~/.unsloth/studio/studio`

This removes the application but keeps your model checkpoints, exports, history, cache, and chats intact.

#### **2. Remove shortcuts and symlinks**

**macOS:**

```bash
rm -rf ~/Applications/Unsloth\ Studio.app ~/Desktop/Unsloth\ Studio
```

#### **3. Remove the CLI command**

**macOS, Linux:**

```bash
rm -f ~/.local/bin/unsloth
```

#### **4. Remove everything (optional)**

To also delete history, cache, chats, model checkpoints, and model exports, delete the entire Unsloth folder:

* MacOS, Linux: `rm -rf ~/.unsloth`

Note that downloaded HF model files are stored separately in the Hugging Face cache - none of the steps above will remove them. See **Deleting model files** below if you want to reclaim that disk space.

{% hint style="warning" %}
Note: Using the `rm -rf` commands will **delete everything**, including your history, cache, chats etc.
{% endhint %}

If you're still encountering dependency issues with Unsloth, many users have resolved them by forcing uninstalling and reinstalling Unsloth:

{% code overflow="wrap" %}

```bash
pip install --upgrade --force-reinstall --no-cache-dir --no-deps unsloth
pip install --upgrade --force-reinstall --no-cache-dir --no-deps unsloth_zoo
```

{% endcode %}

### **Deleting model files**

You can delete old model files either from the bin icon in model search or by removing the relevant cached model folder from the Hugging Face cache directory.

The default cache location is:

{% code expandable="true" %}

```bash
~/.cache/huggingface/hub/
```

{% endcode %}

If `HF_HUB_CACHE` or `HF_HOME` is set, use that location instead. On Linux and WSL, `XDG_CACHE_HOME` can also change the default cache root. You can check with:

{% code expandable="true" %}

```bash
echo ${HF_HUB_CACHE:-${HF_HOME:-${XDG_CACHE_HOME:-$HOME/.cache}/huggingface}/hub}
```

{% endcode %}

To delete a specific model, remove its folder (e.g. `models--unsloth--Llama-3.1-8B-bnb-4bit`) from the cache directory. To clear all cached models:

{% code expandable="true" %}

```bash
rm -rf ~/.cache/huggingface/hub/
```

{% endcode %}
