2

I Can't remove Signal-Desktop (https://signal.org/) in Ubuntu 20.x

The app was originally installed by using Signal official website installation instructions:

Linux (Debian-based) Install Instructions

NOTE: These instructions only work for 64 bit Debian-based Linux distributions such as Ubuntu, Mint etc.

  1. Install our official public software signing key

     wget -O- https://updates.signal.org/desktop/apt/keys.asc | gpg --dearmor > signal-desktop-keyring.gpg
     cat signal-desktop-keyring.gpg | sudo tee -a /usr/share/keyrings/signal-desktop-keyring.gpg > /dev/null
    
  2. Add our repository to your list of repositories

     echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https://updates.signal.org/desktop/apt xenial main' |\
       sudo tee -a /etc/apt/sources.list.d/signal-xenial.list
    
  3. Update your package database and install signal

     sudo apt update && sudo apt install signal-desktop
    

ISSUE

To remove the signal-desktop I use any of the following:

$ sudo apt-get purge signal-desktop
$ sudo apt remove signal-desktop
$ sudo apt remove signal-desktop

Every time the removal is attempted it gives the following message:

E: Malformed line 3 in source list /etc/apt/sources.list.d/signal-xenial.list (type)
E: The list of sources could not be read.
E: Malformed line 3 in source list /etc/apt/sources.list.d/signal-xenial.list (type)
E: The list of sources could not be read.

Using sudoedit /etc/apt/sources.list.d/signal-xenial.list

I can open the file that shows

deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https://updates.signal.org/desktop/apt>

$ sudo apt-get update also doesn't work as I get the message

E: Malformed line 3 in source list /etc/apt/sources.list.d/signal-xenial.list (type)
E: The list of sources could not be read.

I am not sure how to remove Signal.

pLumo
  • 26,947
  • 2
    Based on the information provided here it is not a problem with removing signal it is a corrupted sources list. Remove the offending line from the sources file. – David Oct 06 '21 at 06:21
  • 1
    Please be specific on your release; Ubuntu 20.04 LTS is the LTS release, and 20.10 is the first of the non-LTS releases that work towards the next Ubuntu 22.04 LTS release, so they are different products with many differences (19.10 & 20.04 are far closer than 20.04 & 20.10) – guiverc Oct 06 '21 at 06:22
  • I give +1 because you added all relevant information. I guess you got a downvote from someone for not doing (or not sharing) research, e.g. this related question would have been a good source for such issues in general. – pLumo Oct 06 '21 at 07:09

2 Answers2

3

Your line 3 in the file is wrong:

deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https://updates.signal.org/desktop/apt>

should be

deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https://updates.signal.org/desktop/apt xenial main

(xenial main in the end instead of >).

To fix it, you can edit the file manually or simply run the command from the documentation again, but without -a flag for tee (-a means append, but we want to replace!):

echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https://updates.signal.org/desktop/apt xenial main' \
| sudo tee /etc/apt/sources.list.d/signal-xenial.list

Then you can run sudo apt update again

pLumo
  • 26,947
  • Thank you for your help. It fixed the issue in no time. Signal is gone. In fact I don't recommend using it. – Travel Hunter Oct 06 '21 at 19:40
  • If the answer helped you, you can click the checkmark next to the answer. Also it would interest me why you would not recommend it, any issues with it? I use Signal a lot and can recommend it, however, I'm using the snap version. – pLumo Oct 07 '21 at 06:16
  • I won't recommend it precisely because of the issue encountered. Signal is also hosted by Amazon Web Services. So, talking about security, encryption, and so on stops here. Under US law Signal has to disclose data to 3-letter US agencies we know who they are if Signal is asked for, Telegram is not perfect better in this sense. – Travel Hunter Oct 08 '21 at 12:09
-1

As per Travel's Hunter diagnose, I find I had lost most of my sudo superpowers. In the terminal: $ sudo nautilus

then in the file browser went to: /etc/apt/sources.list.d

deleted signal-xenial.list and other signal something file

then I had recovered my sudo super powers and simply used the same you tried in the begining: $ sudo apt-get purge signal-desktop

LERD
  • 1
  • I think your issue here is very different as there seems to be a system breakdown of your Ubuntu. You will need to do other system checks and audit or backtracking to find out what went wrong. – IS_Eagle_NG Dec 19 '22 at 09:25