做到这一点的“最佳”方法是操纵/var/lib/dpkg/status
。
然而!
该文件具有敏感的语法;错误的方法可能会破坏您的包裹管理。
这是您要做的:
找到一个看起来像这样的块(实际外观可能取决于您要使其变为“不可见”的包):
Package: xserver-xorg-input-vmmouse
Status: install ok installed
Priority: optional
Section: x11
Installed-Size: 136
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Version: 1:12.7.0-2
Provides: xorg-driver-input
Depends: libc6 (>= 2.7), xorg-input-abi-12, xserver-xorg-core (>= 2:1.10.0-0ubuntu1~), xserver-xorg-input-mouse, udev
Description: X.Org X server -- VMMouse input driver to use with VMWare
This package provides the driver for the X11 vmmouse input device.
.
The VMMouse driver enables support for the special VMMouse protocol
that is provided by VMware virtual machines to give absolute pointer
positioning.
.
The vmmouse driver is capable of falling back to the standard "mouse"
driver if a VMware virtual machine is not detected. This allows for
dual-booting of an operating system from a virtual machine to real hardware
without having to edit xorg.conf every time.
.
More information about X.Org can be found at:
<URL:http://www.X.org>
.
This package is built from the X.org xf86-input-vmmouse driver module.
Original-Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
第一条语句Package: <name>
是您要查找的位置,<name>
您要删除的软件包的名称在哪里。
每个块都以Package: <name>
一行开始,以下一行结束Package:
,但是不要删除下一条Package:
语句!
如果您牢记这一点,该软件包将不再似乎已安装到dpkg。尽管所有文件仍然可用。
充其量这是一个可怕的骇客,但工作得很好,在我自己过去曾经做过几次的时候,在Ubuntu有时仍在努力使用破损软件包的时候。我不建议这样做,这是不得已的选择。