How to manually uninstall deb packages or remove broken packages

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
Post Reply
zidgear1357
Level 1
Level 1
Posts: 7
Joined: Wed May 07, 2014 10:33 am

How to manually uninstall deb packages or remove broken packages

Post by zidgear1357 » Sun Nov 06, 2016 2:00 pm

Example: I want to uninstall jitsi-meet-tokens on my 64 bit Linux Mint 18(Ubuntu 16.04)
I got the following errors in my update manager:
dpkg: error processing package jitsi-meet-tokens (--remove):
subprocess installed post-removal script returned error exit status 10
Errors were encountered while processing:
jitsi-meet-tokens
E: Sub-process /usr/bin/dpkg returned an error code (1)

Try the following commands first:

Code: Select all

$ sudo apt-get autoremove

Code: Select all

$ sudo apt-get install -f

Code: Select all

$ sudo apt-get autoclean

Code: Select all

$ sudo dpkg --configure -a

Code: Select all

$ sudo apt-get --force-yes remove jitsi-meet-tokens

Code: Select all

$ sudo apt-get purge jitsi*

Code: Select all

$ sudo apt-get remove jitsi-meet-tokens
If nothing has worked... do the following:
Back up your status file:

Code: Select all

$ sudo cp /var/lib/dpkg/status /var/lib/dpkg/status_bk
Check that if your backup file exists

Code: Select all

$ ls /var/lib/dpkg/
You can also open the backup status file

Code: Select all

$ less /var/lib/dpkg/status_bk
Open the current status file using xed
(xed is the default text editor for Linux Mint 18, but you can use others like gedit or vi if you have that available in your system):

Code: Select all

$ sudo xed /var/lib/dpkg/status
Press Control+f to find the package you want to remove
For example: jitsi-meet-tokens
Delete or Remove all the entry text about the target package
In this case(target package is jitsi-meet-tokens), delete this following section of text in the status file

Package: jitsi-meet-tokens
Status: deinstall ok half-installed
Priority: extra
Section: net
Installed-Size: 53
Maintainer: Jitsi Team <dev@jitsi.org>
Architecture: all
Source: jitsi-meet
Version: 1.0.1073-1
Depends: debconf (>= 0.5) | debconf-2.0, prosody-trunk (>= 1nightly607), libssl-dev, luarocks, jitsi-meet-prosody
Description: Prosody token authentication plugin for Jitsi Meet
Homepage: https://jitsi.org/meet

Then press Control+s to save, and now let's check if the package error has been resolved.

Code: Select all

$ sudo apt-get update
Enjoy!

AscLinux
Level 4
Level 4
Posts: 342
Joined: Sat Oct 29, 2016 3:32 pm

Re: How to manually uninstall deb packages or remove broken packages

Post by AscLinux » Sun Nov 06, 2016 2:36 pm

You should use dpkg when apt or apt-get fails.

zidgear1357
Level 1
Level 1
Posts: 7
Joined: Wed May 07, 2014 10:33 am

Re: How to manually uninstall deb packages or remove broken packages

Post by zidgear1357 » Sun Nov 06, 2016 2:53 pm

How???

Post Reply

Return to “Tutorials”