debin,ubuntu 清理rc标记的包
dpkg -l | grep ^rc 命令可以浏览所有rc状态的包:
dpkg -l | grep ^rc
root@root:/# dpkg -l | grep ^rc
rc adwaita-icon-theme 3.28.0-1ubuntu1 all default icon theme of GNOME (small subset)
rc at-spi2-core 2.28.0-1 amd64 Assistive Technology Service Provider Interface (dbus core)
rc avahi-daemon 0.7-3.1ubuntu1.2 amd64 Avahi mDNS/DNS-SD daemon
rc dbconfig-common 2.0.9 all framework that helps packages to manage databases
rc deepin-icon-theme 15.12.56-3 all Icon Theme for Deepin software and Deepin Desktop Environment
rc deepin-image-viewer 1.2.19-2 amd64 Image Viewer for Deepin Desktop Environment
rc deepin-menu 3.2.0-1 amd64 Deepin menu service
rc deepin-screenshot 4.0.11-1 amd64 Advanced screen shoting tool
dpkg -l | grep ^rc | cut -d' ' -f3 截取包名
dpkg -l | grep ^rc | cut -d' ' -f3
root@root:/# dpkg -l | grep ^rc | cut -d' ' -f3
adwaita-icon-theme
at-spi2-core
avahi-daemon
dbconfig-common
deepin-icon-theme
deepin-image-viewer
deepin-menu
deepin-screenshot
dpkg -l | grep ^rc | cut -d' ' -f3 | sudo xargs dpkg --purge删除所有带 rc 标记的dpkg包
dpkg -l | grep ^rc | cut -d' ' -f3 | sudo xargs dpkg --purge
root@root:/# dpkg -l | grep ^rc | cut -d' ' -f3 | sudo xargs dpkg --purge
(Reading database ... 122626 files and directories currently installed.)
Purging configuration files for adwaita-icon-theme (3.28.0-1ubuntu1) ...
Purging configuration files for at-spi2-core (2.28.0-1) ...
Purging configuration files for avahi-daemon (0.7-3.1ubuntu1.2) ...
rmdir: failed to remove '/var/run/avahi-daemon': Directory not empty
Purging configuration files for dbconfig-common (2.0.9) ...
Purging configuration files for deepin-icon-theme (15.12.56-3) ...
Purging configuration files for deepin-image-viewer (1.2.19-2) ...
Purging configuration files for deepin-menu (3.2.0-1) ...
Purging configuration files for deepin-screenshot (4.0.11-1) ...