Cannot remove pf9-hostagent on WSL
Opened this issue · 0 comments
BioGeek commented
I'm using WSL1
$ cat /proc/version
Linux version 4.4.0-18362-Microsoft (Microsoft@Microsoft.com) (gcc version 5.4.0 (GCC) ) #1049-Microsoft Thu Aug 14 12:01:00 PST 2020
I had previously installed pf9, but wanted to uninstall it. I did:
rm -rf ~/pf9
rm -rf /usr/bin/pf9ctl
rm -rf /opt/pf9
In hindsight, I probably shouldn't have done that last line, because now when I try to install something via apt-get
, I get the error:
$ sudo apt-get install python3-distutils
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-distutils is already the newest version (3.8.5-1~20.04.1).
0 upgraded, 0 newly installed, 0 to remove and 194 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up pf9-hostagent (4.5.0-409.5192397) ...
cp: cannot stat '/opt/pf9/hostagent/pf9-hostagent-systemd': No such file or directory
chown: cannot access '/var/log/pf9': No such file or directory
dpkg: error processing package pf9-hostagent (--configure):
installed pf9-hostagent package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
pf9-hostagent
And when I try to force uninstall pf9-hostagent
, I get:
$ sudo dpkg --remove --force-remove-reinstreq pf9-hostagent
(Reading database ... 175528 files and directories currently installed.)
Removing pf9-hostagent (4.5.0-409.5192397) ...
dpkg: error processing package pf9-hostagent (--remove):
installed pf9-hostagent package pre-removal script subprocess returned error exit status 1
cp: cannot stat '/opt/pf9/hostagent/pf9-hostagent-systemd': No such file or directory
Errors were encountered while processing:
pf9-hostagent
and the status of the package is half-configured
:
$ dpkg-query -s pf9-hostagent
Package: pf9-hostagent
Status: deinstall ok half-configured
Priority: extra
Section: default
Installed-Size: 143610
Maintainer: <pf9@tc-builder-07>
Architecture: all
Version: 4.5.0-409.5192397
Provides: pf9-hostagent, pf9-bbslave
Depends: sudo, procps, python-setuptools, iptables-persistent, python-apt
Conffiles:
/etc/pf9/hostagent.conf 093e39c4a33c4c74a8de953a6779c34a
Description: Platform9 host agent
License: Commercial
Vendor: Platform9
Homepage: http://www.platform9.net
So, how do I get rid of pf9-hostagent
? This is now blocking me of installing anything else.