Ubuntu系统手动升级

1、sudo apt update

2、sudo apt upgrade -y

3、sudo do-release-upgrade

或是下面2个命令:
sudo apt update && apt upgrade -y
sudo do-release-upgrade 

ps:
sudo do-release-upgrade -h
Usage: do-release-upgrade [options]

Options:
  -h, --help            show this help message and exit
  -V, --version         Show version and exit
  -d, --devel-release   If using the latest supported release, upgrade to the
                        development release
  --data-dir=DATA_DIR   Directory that contains the data files
  -p, --proposed        Try upgrading to the latest release using the upgrader
                        from $distro-proposed
  -m MODE, --mode=MODE  Run in a special upgrade mode. Currently 'desktop' for
                        regular upgrades of a desktop system and 'server' for
                        server systems are supported.
  -f FRONTEND, --frontend=FRONTEND
                        Run the specified frontend
  -c, --check-dist-upgrade-only
                        Check only if a new distribution release is available
                        and report the result via the exit code
  --allow-third-party   Try the upgrade with third party mirrors and
                        repositories enabled instead of commenting them out.
  -q, --quiet           
软件清除:

	sudo apt-get autoclean: 自主清理旧版本的软件缓存 /var/cache/apt/archives/
	sudo apt-get clean: 清理所有软件缓存 /var/cache/apt/archives/
	sudo apt-get autoremove: 自主删除系统不再使用的孤立软件,慎用
	
内核清除:	

	dpkg --get-selections | grep linux
	
	能看到已经安装的版本,其中带image的一般就是旧版本
	deinstall指已经删除的旧版本
	install表示还未删除的旧版本内核​​
	
清理残留数据:
	dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P 

(1) remove – 卸载软件包
(2) autoremove – 卸载所有自动安装且不再使用的软件包
(3) purge – 卸载并清除软件包的配置  


这里重点介绍一下autoremove:
apt-get autoremove的行为重点是卸载所有自动安装,例如:C 依赖于 B, D 依赖于B, 且D没有被其他手动安装的包依赖。 
apt-get remove C 将删除C, 同时提示你用apt-get autoremove去清除B,D ;
apt-get autoremove C 将删除B, C, D 。所以,这条命令最恐怖的是在不了解的情况下,你不知道他会把系统中的什么配置文件给删除.
查看已安装的软件:
 apt list --installed | grep -i package关键字
 dpkg --list | grep -i package关键字

source源换成国内:只针对20.04

1、sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

2、把下面内容copy覆盖到sources.list里,保存

deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ focal-backports main restricted universe multiverse

3、sudo apt update

常用的Ubuntu版本代号如下:

  • Ubuntu 22.04:jammy
  • Ubuntu 20.04:focal
  • Ubuntu 18.04:bionic
  • Ubuntu 16.04:xenial

参考:

Ubuntu 如何 在线升级系统_ubuntu_~晨曦静竹~-华为云开发者联盟

如何在Ubuntu中用apt命令删除/卸载软件包(remove/clean/purge)_ubuntu remove-CSDN博客

sudo apt-get autoremove最好不使用_sudo apt autoremove-CSDN博客

Ubuntu20.04更换国内镜像源(阿里、网易163、清华、中科大)_ubuntu_MidoQ-重庆城市开发者社区

ubuntu20.04更改为国内软件源_ubuntu20.04 ruanjianyuan-CSDN博客

Ubuntu 22.04 更换内地源_ubuntu22.04更换国内源-CSDN博客

Ubuntu系统界面卡死解决方案记录_ubuntu卡在开机界面-CSDN博客

### 下载 Popper.min.js 文件的方法 对于希望获取 `popper.min.js` 的开发者来说,可以通过多种方式来实现这一目标。通常情况下,推荐通过官方渠道或可靠的分发网络 (CDN) 来获得最新的稳定版文件。 #### 使用 CDN 获取 Popper.min.js 最简单的方式之一是从流行的 CDN 中加载所需的 JavaScript 库。这不仅简化了集成过程,还可能提高性能,因为许多用户已经缓存了来自这些服务提供商的内容。例如: ```html <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2/dist/umd/popper.min.js"></script> ``` 这种方式不需要手动下载文件到本地服务器;只需将上述 `<script>` 标签添加至 HTML 文档中的适当位置即可立即使用 Popper 功能[^1]。 #### 从 npm 或 yarn 安装 如果项目采用模块化构建工具链,则可以直接利用包管理器如 npm 或 Yarn 进行安装。命令如下所示: ```bash npm install @popperjs/core # 或者 yarn add @popperjs/core ``` 之后可以根据具体需求引入特定功能模块,而不是整个库,从而减少打包后的体积并优化加载速度[^2]。 #### 访问 GitHub 发布页面下载压缩包 另一种方法是访问 Popper.js 的 [GitHub Releases](https://github.com/popperjs/popper-core/releases) 页面,在这里可以选择不同版本的 tarball 或 zip 归档进行下载解压操作。这种方法适合那些偏好离线工作环境或是想要定制编译选项的人群[^3]。 #### 手动克隆仓库 最后一种较为少见但也可行的办法便是直接克隆完整的 Git 存储库副本。这样可以获得开发分支以及历史记录等更多信息,适用于贡献代码或者深入学习内部机制的情况。 ```bash git clone https://github.com/popperjs/popper-core.git cd popper-core ``` 完成以上任一途径后便能成功取得所需版本的 Popper.min.js 文件,并将其应用于个人项目之中[^4]。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值