2022-10-12 01:32:19 +00:00
|
|
|
|
---
|
2023-06-13 06:48:07 +00:00
|
|
|
|
title: Ubuntu 22.04.1 snap-store自身更新&禁止自动更新
|
2022-10-12 01:32:19 +00:00
|
|
|
|
date: 2022-10-05
|
|
|
|
|
tags: Ubuntu
|
|
|
|
|
---
|
|
|
|
|
|
2023-06-13 06:48:07 +00:00
|
|
|
|
## snap-store自身更新
|
|
|
|
|
|
2022-10-12 01:32:19 +00:00
|
|
|
|
目前开发的笔记本使用的是ubuntu22.04.1 版本,默认内置snap商店无法完成自身更新,所以小记一下解决办法。
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
解决办法如下:
|
|
|
|
|
```sh
|
|
|
|
|
# root 账号无需加上sudo
|
|
|
|
|
|
|
|
|
|
sudo killall snap-store
|
|
|
|
|
|
|
|
|
|
sudo snap refresh snap-store
|
|
|
|
|
|
|
|
|
|
```
|
2023-06-13 06:48:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 禁止自动更新
|
|
|
|
|
|
|
|
|
|
> 目前snap 稳定版本通道已经支持禁止自动更新,如果下述命令不起作用或报错,请先同上述进行snap-store自身更新
|
|
|
|
|
|
|
|
|
|
### 全部自动禁止更新
|
|
|
|
|
```sh
|
|
|
|
|
snap refresh --hold
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### 禁用某个软件更新,比如火狐firefox
|
|
|
|
|
```sh
|
|
|
|
|
snap refresh --hold firefox
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### 通过 --unhold 参数重新启用自动更新
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
snap refresh --unhold
|
|
|
|
|
|
|
|
|
|
# 同理恢复某个软件更新,如火狐
|
|
|
|
|
snap refresh --unhold firefox
|
|
|
|
|
```
|