在基于debian的系统中,使用awk,grep,sudo清除已删除软件包的配置文件
Hujiuxiang
・1 分钟阅读
清除基于debian的系统中已删除软件包的配置文件
sudo aptitude purge `dpkg --get-selections | grep deinstall | awk '{print $1}'`
清除已删除软件包的所有配置文件
示例输出
kelevra@lab:~$ sudo aptitude purge `dpkg --get-selections | grep deinstall | awk '{print $1}'` Reading package lists... Done Building dependency tree Reading state information... Done Initializing package states... Done Writing extended state information... Done Reading task descriptions... Done The following packages will be REMOVED: a2ps{p} console-tools{p} desktop-base{p} fam{p} fortune-mod{p} libdatrie0{p} libfam0{p} libfs6{p} libvte9{p} libxfce4mcs-client3{p} libxfce4mcs-manager3{p} lpr{p} x11-apps{p} x11-session-utils{p} xfonts-100dpi{p} xfonts-75dpi{p} xfonts-scalable{p} xinit{p} xli{p} 0 packages upgraded, 0 newly installed, 19 to remove and 0 not upgraded. Need to get 0B of archives. After unpacking 0B will be used. Do you want to continue? [Y/n/?