How to uninstall plex from ubuntu

I am finding it impossible to completely remove plex from my Ubuntu system, i get the following error:

davewold@ubuntuhome:~$ sudo aptitude purge plexmediaserver
[sudo] password for davewold:
no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory
Ignoring unknown parameter "announce version"
The following packages will be REMOVED: libavahi-core7{u} libavahi-gobject0{u} plexmediaserver{p}
0 packages upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 409 kB will be freed.
Do you want to continue? [Y/n/?] y
(Reading database ... 204286 files and directories currently installed.)
Removing libavahi-core7:amd64 (0.6.31-4ubuntu1) ...
Removing libavahi-gobject0:amd64 (0.6.31-4ubuntu1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
(Reading database ... 204272 files and directories currently installed.)
Removing plexmediaserver (0.9.11.7.803-87d0708-debian) ...
Plex Media Server is not running (no process found)...
update-rc.d: /etc/init.d/plexmediaserver exists during rc.d purge (use -f to force)
dpkg: error processing package plexmediaserver (--purge): subprocess installed pre-removal script returned error exit status 1
Errors were encountered while processing: plexmediaserver
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
2

3 Answers

Try to force the removal with sudo aptitude -f purge plexmediaserver If it doesn't work, try these commands:

sudo rm -f /etc/init.d/plexmediaserver
sudo dpkg --purge --force-all plexmediaserver
5

Shot in the dark, but it helped me sometimes.

Reinstall the package, then try sudo apt-get --purge remove <package>.

Also make sure no process is running, related to this package.

If this doesn't work then do it the hard way..

mv /var/lib/dpkg/info/<package>.* /tmp/
dpkg --remove --force-remove-reinstreq <package>
1
cd /etc/init.d/

get rid of the plex init entry

sudo mv plexmediaserver plexmediaserver.dead

remove it from update-rc

sudo update-rc.d -f plexmediaserver remove

Uninstall

sudo apt-get --purge remove -f plexmediaserver

delete the init.d entry

sudo rm -rf plexmediaserver.dead

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like