# Installing Local Patches

This guide explains how to install updates that are already on your computer (from the internet, LAN, or USB).

> [!NOTE]
> If you don't have the update files on your computer yet, you must **[get the update files first](../get-updates)**.

---

## Installing Component Updates

This section covers common {{< term "component" >}} files like `admin`, `curriculum`, `control`, and `type`.

{{% steps %}}

### Confirm Update is Available

Check if the {{< term "component" >}} you want to install is on your computer and see which version it is.

```bash
# Check for the latest 'admin' component
tl-comp-latest admin

# Check for the latest 'docs' curriculum
tl-comp-latest curriculum docs
```

### Run the Installer

There are two different commands for installing components.

**For Most Components:**

Use the `tl-archive-install` command for most components like `admin`, `type`, `control`, etc.

```bash
# Install the latest available version of 'admin'
tl-archive-install admin
```

**For the Curriculum:**

The `curriculum` has its own special installer.

```bash
# Install the latest curriculum (installs the newest version if you don't specify one)

tl-curriculum-install <subject> <version>

# Example: Install the latest version of the 'docs' curriculum
tl-curriculum-install docs
```

### Verify the Installation

After the installation finishes, check the new version number.

```bash
# For most components (e.g., admin)
cat /opt/admin/.version
```

{{% /steps %}}

---

## Installing a Desktop Patch

This section covers applying a minor **patch update** for the Desktop (e.g., from `23.3.0` to `23.3.1`) from files that are already on the computer.

> [!IMPORTANT] **For major version updates (e.g., from `23.x` to `24.x`)**
> The recommended approach is to use one of the [USB Update methods](../update-standard-desktop-usb).

{{% steps %}}

### Check Available Version

Verify the version of the `desktop` {{< term "component" >}} that is available locally.

```bash
tl-comp-latest desktop
```

### Unpack the Update Image

Unpack the Desktop image, replacing `x.x.x` with the version number you found above.

```bash
tl-img-unpack /var/btrfs x.x.x
```

### Apply the Update

Restore the unpacked image to apply the update.

```bash
tl-img-restore /var/btrfs x.x.x
```

### Finalize

Reboot the computer to complete the installation.

```bash
sudo reboot
```

{{% /steps %}}

