# Klipper Update from the Command Line

**URL:** <https://klipper.discourse.group/t/klipper-update-from-the-command-line/10725>\
**Category:** General Discussion\
**Created:** [September 28, 2023, 5:31pm UTC](https://klipper.discourse.group/t/klipper-update-from-the-command-line/10725 "2023-09-28T17:31:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mykepredko](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/mykepredko/32/2085_2.png) [@mykepredko](https://klipper.discourse.group/u/mykepredko)\
**Post date:** [September 28, 2023, 5:31pm UTC](https://klipper.discourse.group/t/klipper-update-from-the-command-line/10725/1 "2023-09-28T17:31:02Z")

</div>

I’m creating some setup scripts for Klipper systems and one of the things I’ve run into when using a Raspberry Pi with the “MainsailOS” provided with Raspberry Pi Imager, the version of Klipper that comes with the MainsailOS image is downlevel and I have issues building a valid .bin file.

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/3/327f0082feb620684b0c553cb872f643cd070272.png)

I believe that the way to check the Klipper version number is to execute an `M115` gcode command which matches what I see on Mainsail:

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/0/0fe9c6ab42593147143ee93c0262a5ac34e583a5.png)

When I look at the Klipper documentation:

[https://www.klipper3d.org/FAQ.html?h=update#how-do-i-upgrade-to-the-latest-software](https://www.klipper3d.org/FAQ.html?h=update#how-do-i-upgrade-to-the-latest-software)

The SSH command line instructions for updating Klipper are:

```auto
cd ~/klipper
git pull
sudo service klipper restart

```

After running these commands, the Mainsail version doesn’t change BUT the version returned by `M115` does indicate that the version has been updated:

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/0/0a34f84dcb207e6be750af40b4097fcd526aae72.png)

If I click on `UPDATE` in Mainsail, the message seems to indicate that klipper is currently up to date:

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/1/1f43eae240e1ebef28a422523e78188c659f78c6.png)

and when I close the update window, the version displayed by Mainsail seems to be correct:

 ![image](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/f/fca0d8c121424b91c9fca94043f8a0b623de3e29.png)

I feel like I’ve probably answered my own question here; the command line instructions given in the Klipper documentation correctly updates Klipper but Mainsail does not reflect the update.

Is this a correct interpretation of what’s happening here?

---

<div class="post-metadata">

**Author:** ![mykepredko](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/mykepredko/32/2085_2.png) [@mykepredko](https://klipper.discourse.group/u/mykepredko)\
**Post date:** [September 29, 2023, 3:11am UTC](https://klipper.discourse.group/t/klipper-update-from-the-command-line/10725/2 "2023-09-29T03:11:41Z")

</div>

After putting this out there, I realized that I should:

1. Start with a virgin MainsailOS system
2. Do the `git pull` process to update Klipper from the command line
3. Do a reboot and see if the Klipper version status message changes
4. If the reboot doesn’t change it: do a shutdown, power cycle and see if the status message changes

Interestingly enough, the version status message doesn’t change if you reboot or shutdown and power cycle. It only changes when you click on `UPDATE`.

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [September 29, 2023, 5:52am UTC](https://klipper.discourse.group/t/klipper-update-from-the-command-line/10725/3 "2023-09-29T05:52:50Z")

</div>

### Baseline

![grafik](https://global.discourse-cdn.com/free1/uploads/klipper/optimized/2X/a/acbe510a5da5d32678075c49dc61d3479957c054_2_690x48.png)

### After git pull

Same as baseline

### After refreshing the version cache

![grafik](https://global.discourse-cdn.com/free1/uploads/klipper/optimized/2X/0/0d465cd657fe3f10cc5f06d32c6642ddcdfe98bb_2_690x43.png)

 ![grafik](https://global.discourse-cdn.com/free1/uploads/klipper/original/2X/8/8f95f9a9e6f5dd4c5b5dc21a4041073aa9a3955a.png)

### My interpretation

- The versions are cached in either Moonraker or the web interfaces (no clue in which one)
- The web interfaces either:
  - Run periodic checks for new versions (no setting seems to exist to control this)
  - Need to refresh the cache manually

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/klipper/original/1X/64419bf2aac6639e6ef5cef200dcd456b0a01ac3.png) [@system](https://klipper.discourse.group/u/system)\
**Post date:** [November 28, 2023, 5:53am UTC](https://klipper.discourse.group/t/klipper-update-from-the-command-line/10725/4 "2023-11-28T05:53:07Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
