2

So I installed Deepin Desktop Environment and got an error while installing but continued anyway, I later on decided I will remove it but then it may not be removed, then I started doing other commands such as sudo apt install -f and it showed me this

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  deepin-anything-server
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 469 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 538850 files and directories currently installed.)
Removing deepin-anything-server (5.0.1-4) ...
userdel: user 'deepin-anything-server' does not exist
Failed on delete user deepin-anything-server
dpkg: error processing package deepin-anything-server (--remove):
 installed deepin-anything-server package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 deepin-anything-server
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

I also tried sudo apt autoremove which showed me this

Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
 deepin-anything-server
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 469 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 538850 files and directories currently installed.)
Removing deepin-anything-server (5.0.1-4) ...
userdel: user 'deepin-anything-server' does not exist
Failed on delete user deepin-anything-server
dpkg: error processing package deepin-anything-server (--remove):
installed deepin-anything-server package post-removal script subprocess returne
d error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
deepin-anything-server
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

Is there any solution to this? I can't also install Synaptic since it gives me this

Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libept1.6.0
Suggested packages:
  dwww menu deborphan apt-xapian-index
The following packages will be REMOVED:
  deepin-anything-server
The following NEW packages will be installed:
  libept1.6.0 synaptic
0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 701 kB of archives.
After this operation, 3,194 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ph.archive.ubuntu.com/ubuntu focal/universe amd64 libept1.6.0 amd64 1.1+nmu3ubuntu3 [79.6 kB]
Get:2 http://ph.archive.ubuntu.com/ubuntu focal/universe amd64 synaptic amd64 0.84.6ubuntu5 [622 kB]
Fetched 701 kB in 2s (294 kB/s)   
(Reading database ... 538850 files and directories currently installed.)
Removing deepin-anything-server (5.0.1-4) ...
userdel: user 'deepin-anything-server' does not exist
Failed on delete user deepin-anything-server
dpkg: error processing package deepin-anything-server (--remove):
 installed deepin-anything-server package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 deepin-anything-server
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

Other information: OS : Ubuntu Studio

Are there any workaround for this? or solution? Thanks!

Edit: Result of apt-cache policy deepin-anything-server

  Installed: (none)
  Candidate: 5.0.1-4
  Version table:
     5.0.1-4 500
        500 http://ppa.launchpad.net/ubuntudde-dev/stable/ubuntu focal/main amd64 Packages
        100 /var/lib/dpkg/status 
Rei
  • 43
  • 9
  • Reinstall the whole OS or the de? – Rei Sep 01 '21 at 12:30
  • How can I remove PPAs and the deepin packages? Is it by using the file system? (I am very sorry, it's my first time using Ubuntu on a live machine and not on a VM (TT^TT); ) – Rei Sep 01 '21 at 12:35
  • Ohh wait live isn't the right term, I mean it's already installed and running on my machine, sorry for the misunderstanding : – Rei Sep 01 '21 at 12:41
  • Update: Can't install ppa-purge it gives me the error again about the dpkg error code – Rei Sep 01 '21 at 13:03
  • Please add output of `apt-cache policy deepin-anything-server` to the question. – N0rbert Sep 01 '21 at 13:04

1 Answers1

6

You have to use a trick - create needed user, remove package, then remove user:

sudo useradd deepin-anything-server
sudo apt-get purge deepin-anything-server
sudo userdel deepin-anything-server

and then for other DKMS-related package

sudo apt-get purge deepin-anything-dkms
sudo dpkg -P --force-all deepin-anything-dkms

Then update package lists and fix package system:

sudo apt-get update
sudo apt-get install -f

If you want to remove Ubuntu DDE stable PPA - remove it with its packages by

sudo apt-get install ppa-purge
sudo ppa-purge ppa:ubuntudde-dev/stable
N0rbert
  • 97,162
  • 34
  • 239
  • 423
  • after purge, it showed me this ` ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/deepin-anything-dkms.0.crash' Error! Bad return status for module build on kernel: 5.11.0-27-lowlatency (x86_64) Consult /var/lib/dkms/deepin-anything/0.0/build/make.log for more information. dpkg: error processing package deepin-anything-dkms (--configure): installed deepin-anything-dkms package post-installation script subprocess returned error exit status 10 Errors were encountered while processing: deepin-anything-dkms E: Sub-process /usr/bin/dpkg returned an error code (1) ` – Rei Sep 01 '21 at 13:08
  • See update above - use `sudo apt-get purge deepin-anything-dkms ; sudo dpkg -P --force-all deepin-anything-dkms` . – N0rbert Sep 01 '21 at 13:10
  • okay but when I use the `sudo userdel deepin-anything-server` is showed me `userdel: user 'deepin-anything-server' does not exist` I already did the useradd command – Rei Sep 01 '21 at 13:14
  • Never mind my machine's working normal again! Thank you! – Rei Sep 01 '21 at 17:00
  • Thanks working fine – Mahadev Gouda Jun 10 '22 at 12:49
  • Thanks. `sudo dpkg -P --force-all deepin-anything-dkms` did the magic that `sudo apt purge` didn't. – bmello Sep 17 '22 at 19:50