推荐收藏!Python 史上最全第三方库收集(800+)

阅读 37

2023-10-08

或是下面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关键字

参考:

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博客

精彩评论(0)

0 0 举报