如何删除包

如何删除包

我在安装包时遇到问题,错误消息:

$ dpkg -i 116667-Ubuntu\ xsplash\ clean\ theme.deb 
(Reading database ... 265031 files and directories currently installed.)
Preparing to unpack 116667-Ubuntu xsplash clean theme.deb ...
mkdir: cannot create directory '/usr/share/images/ubuntu-default': No such file or directory
cp: cannot stat '/usr/share/images/xsplash': No such file or directory
dpkg: error processing archive 116667-Ubuntu xsplash clean theme.deb (--install):
 subprocess new pre-installation script returned error exit status 1
rm: cannot remove '/usr/share/images/xsplash': No such file or directory
mkdir: cannot create directory '/usr/share/images/xsplash': No such file or directory
cp: cannot stat '/usr/share/images/ubuntu-default': No such file or directory
dpkg: error while cleaning up:
 subprocess new post-removal script returned error exit status 1
Errors were encountered while processing:
 116667-Ubuntu xsplash clean theme.deb

$ dpkg -l xsplash-clean message
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
iHR xsplash-clean  1.0          i386         (no description available)

我该如何修复这个错误?

答案1

尝试以下命令:

sudo dpkg -r xsplash-clean

dpkg 手册页解释了该-r选项:

-r, --remove, -P, --purge package...|-a|--pending 删除已安装的软件包。-r 或 --remove 删除除 conffiles 之外的所有内容。这可以避免以后重新安装时必须重新配置软件包。

相关内容