# Barn 1.4.0 支持一键更新 Linux 镜像

> 更新已缓存的 Linux 镜像，升级镜像目录签名密钥，并在 amd64 与 arm64 上使用 Debian 13.8。

---

LLMS 索引： [llms.txt](/zh/llms.txt)

---

Barn 1.4.0 新增 `barn image update`，并为 amd64 和 arm64 提供 Debian 13.8 镜像。刷新官方目录前，请先升级 CLI。新的可执行文件信任为目录 `2026112601` 签名的 Minisign 密钥。[下载与安装](/zh/docs/start/installation/#release-downloads) · [GitHub 发布页](https://github.com/pgsty/barn/releases/tag/v1.4.0)

## 从 1.3.0 升级 {#upgrade}

沿用原安装渠道升级 Barn。macOS 上先执行 `brew update`，再执行 `brew upgrade pgsty/infra/barn`。Linux 上重新运行安装脚本，或安装新版 DEB、RPM。用 `barn version` 确认版本后再执行 `barn update`。Barn 1.3.0 会拒绝新签名，并保留先前已激活的目录。[升级指南](/zh/docs/start/installation/#upgrade-barn)

## 更新 Linux 镜像 {#images}

```bash
barn image update --dry-run
barn image update
barn image update d13i d13a
```

不指定镜像名时，Barn 更新已缓存的镜像家族及架构。缓存为空时只刷新目录。最后一条命令会下载两个架构的 Debian 13.8。使用中国镜像仓库时加上 `--mirror`。需要清理缓存时可加上 `--prune`，Barn 会在更新成功后删除可回收的文件。已有虚拟机继续使用原来的基础镜像。[镜像命令参考](/zh/docs/reference/commands/image/#barn-image-update)

签名目录共收录 9 个发行版家族、31 个镜像文件，其中 17 个由 `stable` 通道选中。默认仍为宿主原生架构的 Ubuntu 24.04（`u24:stable`）。新版 `d13@20261123.2671.1` 已通过原生启动、SSH 和 XFS 数据持久性测试。[Debian 13.8 验收记录](/zh/blog/design/image-refresh-20261126/) · [发布前核查](/zh/blog/design/release-1-4-0-readiness/)

## 彻底销毁运行中的 Linux 实验环境 {#purge}

`barn purge` 与 `barn destroy --yes --purge` 会立即关闭运行中的 Linux 虚拟机，并删除其持久数据盘。如果数据库等客机服务需要正常关机，请先运行 `barn stop`。[Linux 生命周期命令](/zh/docs/reference/commands/lifecycle/#barn-purge)
