Uninstall Script that Removes Everything?

For the last ten years I have been a great fan and supporter of free and open source software, so this email is an admission of defeat for me.

Is there a script or set of instructions that will completely remove jitsi-meet and all associated files, so that it can be reinstalled without errors? I have been trying to create an acceptable working installation for about a month without success. It seems to be impossible to restore the system to it’s previous state so that a new installation can be completed.

I have a clean Ubuntu 18.04 LTS server that has only Midnight Commander and netdata installed.

On the first installation it all seemed to work. I then ran into an nginx problem because I made an error typing in the host name. After trying unsuccessfully to fix it, I decided to uninstall and reinstall. As root I did the following:

  1. I stopped all jitsi. jocofo and prosody processes using systemctl and checking with htop.
  2. I ran the apt-get purge … line from the quick install guide in github.
    Reinstalling did not work, so I repeated from 1) to 2) and then continued:
  3. Uninstalled nginx, LetsEncrypt and Certbot.
  4. Found and deleted every jitsi, Jocofo, Prosody, nginx, LetsEncrypt and Certbot folder and file that I could find.

On reinstalling the following errors occurred:

… Setting up jitsi-videobridge2 (2.1-183-gdbddd169-1) …
useradd: warning: the home directory already exists.
Not copying any file from skel directory into it.

  • Applying /etc/sysctl.d/10-console-messages.conf …
    kernel.printk = 4 4 1 7
  • Applying /etc/sysctl.d/10-ipv6-privacy.conf …
    net.ipv6.conf.all.use_tempaddr = 2
    net.ipv6.conf.default.use_tempaddr = 2
  • Applying /etc/sysctl.d/10-kernel-hardening.conf …
    kernel.kptr_restrict = 1
  • Applying /etc/sysctl.d/10-link-restrictions.conf …
    fs.protected_hardlinks = 1
    fs.protected_symlinks = 1
  • Applying /etc/sysctl.d/10-lxd-inotify.conf …
    fs.inotify.max_user_instances = 1024
  • Applying /etc/sysctl.d/10-magic-sysrq.conf …
    kernel.sysrq = 176
  • Applying /etc/sysctl.d/10-network-security.conf …
    net.ipv4.conf.default.rp_filter = 1
    net.ipv4.conf.all.rp_filter = 1
    net.ipv4.tcp_syncookies = 1
  • Applying /etc/sysctl.d/10-ptrace.conf …
    kernel.yama.ptrace_scope = 1
  • Applying /etc/sysctl.d/10-zeropage.conf …
    vm.mmap_min_addr = 65536
  • Applying /etc/sysctl.d/20-jvb-udp-buffers.conf …
    net.core.rmem_max = 10485760
    net.core.netdev_max_backlog = 100000
  • Applying /usr/lib/sysctl.d/50-default.conf …
    net.ipv4.conf.all.promote_secondaries = 1
    net.core.default_qdisc = fq_codel
  • Applying /etc/sysctl.d/99-sysctl.conf …
  • Applying /etc/sysctl.conf …
    Created symlink /etc/systemd/system/multi-user.target.wants/jitsi-videobridge2.service → /lib/systemd/system/jitsi-videobridge2.service.
    Selecting previously unselected package jitsi-meet.
    (Reading database … 80102 files and directories currently installed.)
    Preparing to unpack …/jitsi-meet_2.0.4468-1_all.deb …
    Unpacking jitsi-meet (2.0.4468-1) …
    Setting up jitsi-meet-web-config (1.0.4025-1) …
    Can’t load /root/.rnd into RNG
    140630885654976:error:2406F079:random number generator:RAND_load_file:Cannot open file:…/crypto/rand/randfile.c:88:Filename=/root/.rnd
    Generating a RSA private key
    …++++
    …++++
    writing new private key to ‘/etc/jitsi/meet/jitsi.meetu3adacorum.org.key’

cp: cannot create regular file ‘/etc/nginx/sites-available/jitsi.meetu3adacorum.org.conf’: No such file or directory
dpkg: error processing package jitsi-meet-web-config (–configure):
installed jitsi-meet-web-config package post-installation script subprocess returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@jitsi:/#

I would really appreciate some guidance other than run systemctl status prosody.service and journalctl -xe.

I hate to say it but unless jitsi-meet can be installed and removed and installed again with standard scripts it must have and will contnue to attract and lose users without knowing it. It hurts to say it but Zoom looks increasingly attractive.

1 Like

Apart from certbot (not installed with apt in the default Jitsi Debian package) deleting files and directories manually when the package uninstallation has not specifically warned about them is always the symptom of a mistake, probably of the user, but sometimes of the packager.

That’s probably the root cause of your problem.

The best way of uninstall a system like Jitsi (a very fast moving system where the packaging is done by people having other priorities, and is probably not tested as thoroughly as is usually done by Debian packagers) is to go through the installed packages in the apt logs and to carefully remove them. I have done this myself one time, and it worked. Deleting directories by hand is often a sign that you missed something.

In my notes I have this point that default install brings packages named ca-certificates-java and java-common openjdk-8-jre-headless and these are not removed automatically by only removing a few Jitsi packages while it’s necessary that ca-certificates at least is purged for the install to work again a second time.

The only bad trouble I had is that one time I had to do

echo PURGE | debconf-communicate jitsi-videobridge

however it happened only one time, the other times it worked without that. Must have been a glitch or a temporary bug.

Try this now :-

sudo apt-get purge jigasi jitsi-meet jitsi-meet-web-config jitsi-meet-prosody jitsi-meet-turnserver jitsi-meet-web jicofo jitsi-videobridge jitsi-videobridge2 prosody nginx

sudo apt-get autoremove

Thanks, I found and removed some more. Will reinstall in a few moments.

Thanks. Just ran it after doing the other things. Result is below. I should be able to start again.

webadmin@jitsi:/$ sudo apt-get purge jigasi jitsi-meet jitsi-meet-web-config jitsi-meet-prosody jitsi-meet-turnserver jitsi-meet-web jicofo jitsi-videobridge jitsi-videobridge2 prosody nginx
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package ‘nginx’ is not installed, so not removed
Package ‘jicofo’ is not installed, so not removed
Package ‘jigasi’ is not installed, so not removed
Package ‘jitsi-meet-prosody’ is not installed, so not removed
Package ‘jitsi-meet-turnserver’ is not installed, so not removed
Package ‘jitsi-meet-web-config’ is not installed, so not removed
Package ‘jitsi-meet-web’ is not installed, so not removed
Package ‘jitsi-meet’ is not installed, so not removed
Package ‘jitsi-videobridge2’ is not installed, so not removed
Package ‘jitsi-videobridge’ is not installed, so not removed
The following packages will be REMOVED
prosody*
0 to upgrade, 0 to newly install, 1 to remove and 0 not to upgrade.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database … 78335 files and directories currently installed.)
Purging configuration files for prosody (0.10.0-1build1) …
groupdel: group ‘prosody’ does not exist
Processing triggers for systemd (237-3ubuntu10.39) …
Processing triggers for ureadahead (0.100.0-21) …

After following the quick install instructions, it appeared to run smoothly, but I was not asked for the server name. When all was finished nginx was not installed!

yep that was the symptom where I had to do
echo PURGE | debconf-communicate jitsi-videobridge
after uninstalling everything so the full re-install could go as if nothing had ever been installed.

I have now

  1. installed nginx and certbot with new certificates.
  2. installed jitsi-meet

The link to jitsi.blah.org now shows the nginx page from /etc/nginx/

I am carefully editing sites-available and sites-enabled. I have deleted default from sites-enabled and am about to experiment more with /etc/nginx/sites-available/jitsi.blah.org.conf

1 Like

Final fix was to edit sites-available/jitsi.blah.org.conf file to put back the ‘default’ for port 80 http.
server {
listen 80;
listen [::]:80;
server_name default; #jitsi.blah.org;

Thanks for the help and advice. It really has taken me a month to get here!

1 Like

Pls help.
I can’t explain better than Windsurfer my whish to go further while blocked from recurring and changing issues (while new jitsi-meet releases are coming with new … little issues). But I’m a step from give up, frustrated by the amount of time vasted demonstrating my lacks without being able to demontrate the high value of this Application.

I’m working on Ubuntu 18.4 (desktop) minimal install.
Couple of weeks ago Jitsi-meet was quite OK, but after an upgrade … now I’m 100 steps back.

I’m exacly at the position posted by Windsurfer at the beginning.
Also after the suggested steps in this post.

Tried:
sudo apt-get purge jigasi jitsi-meet jitsi-meet-web-config jitsi-meet-prosody jitsi-meet-turnserver jitsi-meet-web jicofo jitsi-videobridge jitsi-videobridge2 prosody nginx

sudo apt-get autoremove

echo PURGE | debconf-communicate jitsi-videobridge

made some check w/ “dpkg” … clean.
Then:
sudo apt-get install -y nginx
sudo apt install certbot (alread in)

… postponed the certificates install (thinking to try w/ Let’s encrypt)

sudo apt-get install jitsi-meet

re-made the procedure 3 times, adding more remove/purge …
Result:
a) not asked for the hostname
b) ERROR … exacltly the same as at the beginning of this post.

I’ve the same feeling of Windsurfer (at the beginning of this post) and mant many more dev not appearing here.

I’ve made more the the possible to see and making to see a working instance of jitsi-meet, but i’ve not neen able to have a STABLE install coming directly from the procedure illustrated in the “Quick-install” guide.
Don’t let me stay back with FaceTime, Teams, Zoom, HouseParty etc …

Pls, do you have any suggestion … to get a stable installation ?

tnxx

after bagning my head for month … that was my last try:

CLEAN-up:
sudo apt-get purge jigasi jitsi-meet jitsi-meet-web-config jitsi-meet-prosody jitsi-meet-turnserver jitsi-meet-web jicofo jitsi-videobridge2

sudo apt-get purge --auto-remove jitsi-meet

sudo apt autoremove
sudo dpkg -l jitsi* (to verify j-m was completely removed)

sudo apt purge nginx nginx-common nginx-full nginx-core (got an error so repeated this way)
sudo apt remove nginx nginx-common nginx-full nginx-core
sudo apt purge nginx nginx-common nginx-full nginx-core
sudo rm -r /var/www (there was some stuff in there)

sudo dpkg -l nginx*

INSTALL ngninx
sudo apt-get install -y nginx
sudo systemctl status nginx.service (is it on ? NO)
sudo systemctl restart nginx.service (restart)

(I had to add these dir to avoid error during jitsi-meet install)
sudo ls -lap /etc/nginx
sudo mkdir /etc/nginx/sites-available
sudo mkdir /etc/nginx/sites-enabled
sudo mkdir /etc/nginx/modules-enabled

ADD some stuff. without these jitsi-meet install actually could fail.
sudo nano /etc/nginx/nginx.conf
(added references to the “conf” files created during j-m install on the above mentioned folders)
Addedd at the end of the file:
include /etc/nginx/sites-enabled/.conf;
include /etc/nginx/modules-enabled/
.conf;

——

INSTALL jitsi-meet:
sudo apt-get install jitsi-meet

Don’t ask me why, but without any configuration -after weeks of vasted time- miracolously it seams to be working (tested just calling to https://mydomain.com)

and for 1st time … nginx is working properly, and listening on 443 Port !

Many thanks for all the support got from you and the Community

See you on next steps !

1 Like

Congratulations - strength of character and perseverance are great attributes!

I want to uninstall jitsi . I have docker-jitsi-meet.

what commands i should use? can you please help me?