首页 > 系统相关 >Linux包管理学习

Linux包管理学习

时间:2022-11-09 09:12:00浏览次数:62  
标签:files package -- 管理 rc remove 学习 Linux dpkg

删除rc状态的包:

ubuntu下,用apt-get remove 某个软件包后,用dpkg -l 查看,有些包变成rc 状态
rc状态的意思是:
r: the package is marked for removal.
c: the configuration files are currently present in the system

要想彻底删除,可以用以下命令:
dpkg -l | grep ^rc | cut -d' ' -f3| sudo xargs dpkg -P
或:
dpkg --list | grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg --purge

man dpkg有这样的说明:
-r, --remove, -P, --purge package...|-a|--pending
Remove an installed package. -r or --remove remove everything except conffiles. This may avoid having to
reconfigure the package if it is reinstalled later. (Conffiles are configuration files that are listed in the
DEBIAN/conffiles control file). -P or --purge removes everything, including conffiles. If -a or --pending is
given instead of a package name, then all packages unpacked, but marked to be removed or purged in file
/var/lib/dpkg/status, are removed or purged, respectively. Note: some configuration files might be unknown to
dpkg because they are created and handled separately through the configuration scripts. In that case, dpkg
won't remove them by itself, but the package's postrm script (which is called by dpkg), has to take care of
their removal during purge. Of course, this only applies to files in system directories, not configuration
files written to individual users' home directories.
Removing of a package consists of the following steps:

  1. Run prerm script
  2. Remove the installed files
  3. Run postrm script

源文档 https://my.oschina.net/u/1000151/blog/197778

标签:files,package,--,管理,rc,remove,学习,Linux,dpkg
From: https://www.cnblogs.com/diaoz/p/16872421.html

相关文章

  • Linux学习笔记(8)——正则表达式与文件格式化处理
    正则表达式与文件格式化处理正则表达式与文件格式化处理一、什么是正则表达式?二、基础正则表达式2.1语系对正则表达式的影响2.2grep的一些高级选项2.3基础正则......
  • Linux操作系统随笔2
    发现问题,查找原因,解决并记录。这是很好的——GaryCurp_2022.11.8今天还是继续搭建环境,教材到CentOS7导入hadoop包时候注释给出了两种不认识的导入方法,所以想要了解一下,然......
  • Linux操作系统随笔
    感觉更喜欢dos——GaryCurp_202.11.7环境:CentOS7X64设置默认进入命令行界面(前提是安装了GUI界面,不然也只有dos界面)#systemctlset-defaultmulti-user.target //默......
  • MFC学习目录
              ......
  • linux_编写一个shell脚本
    linux|编写一个shell脚本编写第一个shell$vimhello.sh#!/bin/bashecho"helloworld"$chmod777hello.sh$./hello.shShell变量系统变量用户自定义变量定......
  • linux 进程管理
    Linux进程管理linux中每一个运行中的程序叫做进程,每个运行中的进程都会分配一个ID号大多系统进程运行在后台,常驻在系统中直到关机才会结束查看Linux的系统进程ps$ps......
  • MyBatis 学习记录
    Mybatis获取一、Github下载源码与官方文档......
  • 018.MyBatis日志管理
    1.SLF4j与Logback   2.自定义使用logback日志2.1 pom.xml<dependency><groupId>ch.qos.logback</groupId><artifactId>log......
  • uniapp_01_实现打开文件管理
    *##关于uniapp实现app端文件管理*####前言*####安卓是如何实现的*####uniapp中几种实现方式*####文档里需要用到的主要api介绍*####实现###前言......
  • valheim英灵神殿Linux使用docker开服
    valheim英灵神殿Linux使用docker开服使用机器:2核4G的Ubuntu,swap设置为8G(满足配置能装docker的Linux就行)在docker官网的镜像站有别人封装好的镜像,我们下载下来启动就可......