Score:2

Can't install and uninstall packages, can't also remove dde

in flag
Rei

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 avatar
in flag
Rei
Reinstall the whole OS or the de?
Rei avatar
in flag
Rei
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 avatar
in flag
Rei
Ohh wait live isn't the right term, I mean it's already installed and running on my machine, sorry for the misunderstanding :<
Rei avatar
in flag
Rei
Update: Can't install ppa-purge it gives me the error again about the dpkg error code
N0rbert avatar
zw flag
Please add output of `apt-cache policy deepin-anything-server` to the question.
Score:5
zw flag

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
Rei avatar
in flag
Rei
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) `
N0rbert avatar
zw flag
See update above - use `sudo apt-get purge deepin-anything-dkms ; sudo dpkg -P --force-all deepin-anything-dkms` .
Rei avatar
in flag
Rei
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 avatar
in flag
Rei
Never mind my machine's working normal again! Thank you!
Mahadev Gouda avatar
bz flag
Thanks working fine
bmello avatar
tj flag
Thanks. `sudo dpkg -P --force-all deepin-anything-dkms` did the magic that `sudo apt purge` didn't.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.