# Remove packages failure

**URL:** <https://forum.remote.it/t/remove-packages-failure/227>\
**Category:** Troubleshooting\
**Created:** [July 23, 2020, 7:22pm UTC](https://forum.remote.it/t/remove-packages-failure/227 "2020-07-23T19:22:03Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![giorgis](https://avatars.discourse-cdn.com/v4/letter/g/6a8cbe/32.png) [@giorgis](https://forum.remote.it/u/giorgis)\
**Post date:** [July 23, 2020, 7:22pm UTC](https://forum.remote.it/t/remove-packages-failure/227/1 "2020-07-23T19:22:03Z")

</div>

Hi all,

I had some problems while installing remote.it and although I used the service without a problem for a couple of days now I want to remove all packages and start from the beginning.

Thus I am trying to do the following with the errors as shown :

1. Remove connectd

#apt purge connectd  
Reading package lists… Done  
Building dependency tree  
Reading state information… Done  
The following packages will be REMOVED:  
connectd\*  
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.  
1 not fully installed or removed.  
After this operation, 0 B of additional disk space will be used.  
Do you want to continue? [Y/n]  
(Reading database … 162450 files and directories currently installed.)  
Removing connectd (2.5.37) …  
/usr/bin/connectd\_stop\_all: 22: .: Can’t open /usr/bin/connectd\_options  
dpkg: error processing package connectd (–remove):  
installed connectd package pre-removal script subprocess returned error exit status 127

================================================================================  
Run “sudo connectd\_installer” to interactively install remote.it Services on this device.

See [https://docs.remote.it](https://docs.remote.it) for more information.

================================================================================  
Errors were encountered while processing:  
connectd  
E: Sub-process /usr/bin/dpkg returned an error code (1)

1. Remove remoteit

#apt purge remoteit  
Reading package lists… Done  
Building dependency tree  
Reading state information… Done  
The following packages were automatically installed and are no longer required:  
avahi-utils jq libjq1 libonig5  
Use ‘sudo apt autoremove’ to remove them.  
The following packages will be REMOVED:  
remoteit\*  
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.  
1 not fully installed or removed.  
After this operation, 0 B of additional disk space will be used.  
Do you want to continue? [Y/n]  
(Reading database … 162450 files and directories currently installed.)  
Removing remoteit (1.0.14) …  
∘ Login with remote.it account  
∘ Remove services  
∘ UnRegister device ‘’  
∘ Remoteit Agent - Stop  
∘ Remoteit Agent - Uninstall  
∘ Remove dependencies  
✓ DONE: remote.it has been removed from your system  
Failed to disable unit: Unit file remoteit-headless.service does not exist.  
dpkg: error processing package remoteit (–remove):  
installed remoteit package pre-removal script subprocess returned error exit status 1  
/var/lib/dpkg/info/remoteit.postinst: 11: /var/lib/dpkg/info/remoteit.postinst: /usr/share/remoteit/connectd: not found  
dpkg: error while cleaning up:  
installed remoteit package post-installation script subprocess returned error exit status 127  
Errors were encountered while processing:  
remoteit  
E: Sub-process /usr/bin/dpkg returned an error code (1)

It seems to me that some necessary files are missing. Can someone share his/hers experience and thoughts on how to make a clean installation from scratch (other than building my Pi from the beginning)?

Looking forward for your answers!

Regards

---

<div class="post-metadata">

**Author:** ![gary](https://avatars.discourse-cdn.com/v4/letter/g/839c29/32.png) [@gary](https://forum.remote.it/u/gary)\
**Post date:** [July 29, 2020, 1:05pm UTC](https://forum.remote.it/t/remove-packages-failure/227/2 "2020-07-29T13:05:22Z")

</div>

Yeah, sorry about that… there’s an issue - exactly as you’ve noted, when trying to uninstall either package if both are installed. Let me spend some time on this and see if I can come up with a way to force the uninstall.

The first thing I noticed is that you are not using “sudo” with the “apt purge” command. Or at least, it looks that way.

---

<div class="post-metadata">

**Author:** ![giorgis](https://avatars.discourse-cdn.com/v4/letter/g/6a8cbe/32.png) [@giorgis](https://forum.remote.it/u/giorgis)\
**Post date:** [July 29, 2020, 5:15pm UTC](https://forum.remote.it/t/remove-packages-failure/227/3 "2020-07-29T17:15:24Z")

</div>

Hi Gary!

Thanks for your help.

As for the following:

> [@gary](#):
>
> The first thing I noticed is that you are not using “sudo” with the “apt purge” command. Or at least, it looks that way.

I have already used “sudo su” so all commands are running as “root”.

---

<div class="post-metadata">

**Author:** ![gary](https://avatars.discourse-cdn.com/v4/letter/g/839c29/32.png) [@gary](https://forum.remote.it/u/gary)\
**Post date:** [July 29, 2020, 9:15pm UTC](https://forum.remote.it/t/remove-packages-failure/227/4 "2020-07-29T21:15:00Z")

</div>

Engineer’s suggestion would be to reinstall connectd, then reinstall remoteit, purge remoteit, then purge connectd.

I just tried it here in that order and it worked.

---

<div class="post-metadata">

**Author:** ![giorgis](https://avatars.discourse-cdn.com/v4/letter/g/6a8cbe/32.png) [@giorgis](https://forum.remote.it/u/giorgis)\
**Post date:** [July 30, 2020, 5:45pm UTC](https://forum.remote.it/t/remove-packages-failure/227/5 "2020-07-30T17:45:58Z")

</div>

Unfortunately I cannot verify the solution!

Here is what I have done :

1. Re-Install “connectd” (using the “/var/cache/apt/archives” packages)

#dpkg -i connectd\_2.5.37\_armhf.deb  
(Reading database … 162451 files and directories currently installed.)  
Preparing to unpack connectd\_2.5.37\_armhf.deb …  
Unpacking connectd (2.5.37) over (2.5.37) …  
Setting up connectd (2.5.37) …

================================================================================  
Run “sudo connectd\_installer” to interactively install remote.it Services on this device.

See [https://docs.remote.it](https://docs.remote.it) for more information.

================================================================================

1. Re-Install “remoteit” (using the “/var/cache/apt/archives” packages)  
#dpkg -i remoteit\_1.0.14\_armhf.deb  
(Reading database … 162451 files and directories currently installed.)  
Preparing to unpack remoteit\_1.0.14\_armhf.deb …  
Unpacking remoteit (1.0.14) over (1.0.14) …  
Setting up remoteit (1.0.14) …  
you already have the latest connectd version  
installing muxer version 0.3  
you already have the latest remoteit version  
you already have the latest desktop version  
Created symlink /etc/systemd/system/multi-user.target.wants/avahi-alias@remoteit.local.service → /etc/systemd/system/avahi-alias@remoteit.local.service.  
================================================================================

Continue your device registration at [http://find.remote.it](http://find.remote.it)  
or hxxp://xxxxxx:29999 (removed URL due to forum restrictions)  
or hxxp://xxxxxx:29999 (removed URL due to forum restrictions)

================================================================================

1. Tried to remove “remoteit” with error again (have a look below):

#apt-get remove --purge remoteit  
Reading package lists… Done  
Building dependency tree  
Reading state information… Done  
The following packages were automatically installed and are no longer required:  
avahi-utils jq libjq1 libonig5  
Use ‘sudo apt autoremove’ to remove them.  
The following packages will be REMOVED:  
remoteit\*  
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.  
After this operation, 0 B of additional disk space will be used.  
Do you want to continue? [Y/n]  
(Reading database … 162450 files and directories currently installed.)  
Removing remoteit (1.0.14) …  
∘ Login with remote.it account  
∘ Remove services  
∘ UnRegister device ‘’  
∘ Remoteit Agent - Stop  
∘ Remoteit Agent - Uninstall  
∘ Remove dependencies  
✓ DONE: remote.it has been removed from your system  
Removed /etc/systemd/system/multi-user.target.wants/avahi-alias@remoteit.local.service.  
Failed to disable unit: Unit file remoteit-headless.service does not exist.  
dpkg: error processing package remoteit (–remove):  
installed remoteit package pre-removal script subprocess returned error exit status 1  
installing connectd version 4.8  
/var/lib/dpkg/info/remoteit.postinst: 25: /var/lib/dpkg/info/remoteit.postinst: /usr/share/remoteit/muxer: not found  
installing muxer version  
mv: cannot stat ‘/usr/share/remoteit/muxer’: No such file or directory  
mv: cannot stat ‘/usr/share/remoteit/demuxer’: No such file or directory  
dpkg: error while cleaning up:  
installed remoteit package post-installation script subprocess returned error exit status 1  
Errors were encountered while processing:  
remoteit  
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any suggestions now?

---

<div class="post-metadata">

**Author:** ![gary](https://avatars.discourse-cdn.com/v4/letter/g/839c29/32.png) [@gary](https://forum.remote.it/u/gary)\
**Post date:** [July 30, 2020, 7:09pm UTC](https://forum.remote.it/t/remove-packages-failure/227/6 "2020-07-30T19:09:51Z")

</div>

OK, I can’t reproduce your failure at the moment, but going on this article -

> <https://askubuntu.com/questions/48014/how-force-remove-when-post-installation-script-always-fail>

Please try:

```auto
sudo dpkg --purge --force-all connectd

sudo dpkg --purge --force-all remoteit

```

---

<div class="post-metadata">

**Author:** ![giorgis](https://avatars.discourse-cdn.com/v4/letter/g/6a8cbe/32.png) [@giorgis](https://forum.remote.it/u/giorgis)\
**Post date:** [July 30, 2020, 10:50pm UTC](https://forum.remote.it/t/remove-packages-failure/227/7 "2020-07-30T22:50:46Z")

</div>

Unfortunately not…Both of them still fail:

#dpkg --purge --force-all connectd  
(Reading database … 162450 files and directories currently installed.)  
Removing connectd (2.5.37) …  
/usr/bin/connectd\_stop\_all: 22: .: Can’t open /usr/bin/connectd\_options  
dpkg: error processing package connectd (–purge):  
installed connectd package pre-removal script subprocess returned error exit status 127

================================================================================  
Run “sudo connectd\_installer” to interactively install remote.it Services on this device.

================================================================================  
Errors were encountered while processing:  
connectd

#dpkg --purge --force-all remoteit  
(Reading database … 162450 files and directories currently installed.)  
Removing remoteit (1.0.14) …  
∘ Login with remote.it account  
∘ Remove services  
∘ UnRegister device ‘’  
∘ Remoteit Agent - Stop  
∘ Remoteit Agent - Uninstall  
∘ Remove dependencies  
✓ DONE: remote.it has been removed from your system  
Failed to disable unit: Unit file remoteit-headless.service does not exist.  
dpkg: error processing package remoteit (–purge):  
installed remoteit package pre-removal script subprocess returned error exit status 1  
/var/lib/dpkg/info/remoteit.postinst: 11: /var/lib/dpkg/info/remoteit.postinst: /usr/share/remoteit/connectd: not found  
dpkg: error while cleaning up:  
installed remoteit package post-installation script subprocess returned error exit status 127  
Errors were encountered while processing:  
remoteit

---

<div class="post-metadata">

**Author:** ![gary](https://avatars.discourse-cdn.com/v4/letter/g/839c29/32.png) [@gary](https://forum.remote.it/u/gary)\
**Post date:** [July 31, 2020, 2:50pm UTC](https://forum.remote.it/t/remove-packages-failure/227/8 "2020-07-31T14:50:00Z")

</div>

Well, let’s try one things at a time. I don’t know how this happened and can’t reproduce the exact scenario here.

> [@giorgis](#):
>
> /usr/bin/connectd\_stop\_all: 22: .: Can’t open /usr/bin/connectd\_options

Check to see if that file exists, e.g.

ls -l /usr/bin/connectd\_options

If it does, remove it forcefully:

sudo rm /usr/bin/connectd\_options

and then replace it:

sudo su  
cd /usr/bin  
wget [https://raw.githubusercontent.com/remoteit/installer/master/connectd/usr/bin/connectd\_options](https://raw.githubusercontent.com/remoteit/installer/master/connectd/usr/bin/connectd_options)

That should restore the connectd\_options file, which hopefully will allow the purge of the connectd package to proceed.

Then, if purging remoteit continues to complain about:

> [@giorgis](#):
>
> /var/lib/dpkg/info/remoteit.postinst: 11: /var/lib/dpkg/info/remoteit.postinst: /usr/share/remoteit/connectd: not found

(as root still)  
cd /usr/share/remoteit  
wget [https://github.com/remoteit/connectd/releases/download/v4.8/connectd.arm-linaro-pi](https://github.com/remoteit/connectd/releases/download/v4.8/connectd.arm-linaro-pi)  
mv connectd.arm-linaro-pi connectd

Regarding this:

> [@giorgis](#):
>
> Failed to disable unit: Unit file remoteit-headless.service does not exist.

I am looking at suggestions in this article: [dpkg - How to remove/install a package that is not fully installed? - Ask Ubuntu](https://askubuntu.com/questions/438345/how-to-remove-install-a-package-that-is-not-fully-installed)

It might be easiest to delete the prerm file.

e.g.  
sudo rm /var/lib/dpkg/info/remoteit.prerm

Sorry about all the trouble. Let me know what happens!

---

<div class="post-metadata">

**Author:** ![giorgis](https://avatars.discourse-cdn.com/v4/letter/g/6a8cbe/32.png) [@giorgis](https://forum.remote.it/u/giorgis)\
**Post date:** [July 31, 2020, 5:57pm UTC](https://forum.remote.it/t/remove-packages-failure/227/9 "2020-07-31T17:57:34Z")

</div>

Hi Gary!

Indeed everything was a big mess and i don’t really know what has happened.

As you suggested I had to download from github the “connectd\_options” and additionally the “oem\_settings” since this was failing afterwards!

Then I could remove the “connectd” package.

Following the same methodology I did the same for “remoteit”  
First of all I have downloaded the ones that couldn’t be found from github as suggested.  
As for the error in “remoteit.prerm” regarding “remoteit-headless.service” what I did was to go in “remoteit.prerm” file and “hashed” the line referring to disablement of “remoteit-headless”.

Then tried the remove (purge) and was able to successfully remove it!

I think everything is now in order but what triggered my curiosity is the following quote from github:

```
**The easiest way to install remote.it on a Linux system is to run the following on the command line:**

curl -LkO https://raw.githubusercontent.com/remoteit/installer/master/scripts/auto-install.sh
chmod +x ./auto-install.sh
sudo ./auto-install.sh

```

So what is the recommended way to go? Should we install it using the aforementioned github script or should we follow the procedure described in “remote.it” which is:

`sudo apt install remoteit`

I had followed the later and ended up in all these kind of troubles…

So what do you think? Which one is less error prone?

Once again thank you very much for your help!!!

Best regards,

G.

---

<div class="post-metadata">

**Author:** ![gary](https://avatars.discourse-cdn.com/v4/letter/g/839c29/32.png) [@gary](https://forum.remote.it/u/gary)\
**Post date:** [August 1, 2020, 3:37pm UTC](https://forum.remote.it/t/remove-packages-failure/227/10 "2020-08-01T15:37:35Z")

</div>

There’s a bit of a terminology issue that is potentially confusing.

**remote.it** with a dot in the middle refers both to our company and product offering.  
**connectd** is a package which delivers remote.it functionality.  
**remoteit** (no dot) is a more recent package which also delivers remote.it functionality.

auto-install.sh installs the older connectd package. It’s the same thing you’d get on recent Raspbian or Raspberry Pi OS releases if you run “apt install connectd”. auto-install.sh (connectd) also supports a wider variety of Linux platforms than remoteit, such as OpenWRT, which are not Debian based. At the moment, remoteit works for Windows, Mac, and Debian based OSes running Arm or Intel/AMD CPUs. connectd does not support Windows or Mac.

The end result is slightly different.

remoteit includes the Web Admin Panel which lets you add or remove services using a browser, whereas using connectd would require you to get to a console (e.g. SSH) and run the connectd\_installer package to do the same thing.

connectd supports Bulk and Auto Registration for Mass Production. Auto registration for remoteit is in the works but not ready yet.

connectd has been released and updated for the past 5 years with very few changes in its basic operation (all shell scripts).

remoteit is more recent and works a completely different way. There are some issues, such as the ones you encountered here, that I do not understand how they could have happened.

All that said, I would start again by using the remoteit package by itself, not installed over connectd. If for whatever reason you continue to face any issue, purge remoteit and install connectd. If that’s in fact what you did (installed remoteit and then all these problems happened), then just install connectd.

---

<div class="post-metadata">

**Author:** ![giorgis](https://avatars.discourse-cdn.com/v4/letter/g/6a8cbe/32.png) [@giorgis](https://forum.remote.it/u/giorgis)\
**Post date:** [August 3, 2020, 4:43pm UTC](https://forum.remote.it/t/remove-packages-failure/227/11 "2020-08-03T16:43:53Z")

</div>

OK! I see what’s happening here!

I am positive that I have tried using:

```
sudo apt install remoteit

```

but not sure though. I vaguely remember that there was a “connectd” requirement and somehow I ended in this mess…(maybe both were installed in the end…)

Anyway, I am willing to try again before going down the “connectd” way but my main concern is that auto registration is not yet available for “remoteit”. Do you have any estimate for that before being into trouble again?

Thanks!

---

<div class="post-metadata">

**Author:** ![gary](https://avatars.discourse-cdn.com/v4/letter/g/839c29/32.png) [@gary](https://forum.remote.it/u/gary)\
**Post date:** [August 7, 2020, 3:08am UTC](https://forum.remote.it/t/remove-packages-failure/227/12 "2020-08-07T03:08:23Z")

</div>

remoteit uses the connectd daemon but it should NOT have a dependency on the connectd package. We do however provide an automatic conversion if you install remote.it over a suitably recent connectd package which has already been configured using the interactive script connectd\_installer.

I am not good at predicting when things will be ready. My suggestion, if you really want to get going with auto-registration, would be to use the connectd package.

Thanks!

---

<div class="post-metadata">

**Author:** ![jannegpriv](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.remote.it/jannegpriv/32/109_2.png) [@jannegpriv](https://forum.remote.it/u/jannegpriv)\
**Post date:** [November 22, 2020, 8:06pm UTC](https://forum.remote.it/t/remove-packages-failure/227/13 "2020-11-22T20:06:31Z")

</div>

I’ve also ran into this apt package dependency removal problem, I’ve managed to remove connectd using:

```auto
root@k3s-master-1:/usr/share/remoteit# sudo dpkg --purge --force-all connectd
dpkg: warning: ignoring request to remove connectd which isn't installed

```

When I then try to purge remoteit I ran into:

```auto
root@k3s-master-1:/usr/share/remoteit# sudo dpkg --purge --force-all remoteit
(Reading database ... 41518 files and directories currently installed.)
Removing remoteit (1.2.2) ...
Failed to disable unit: Unit file remoteit-headless.service does not exist.
dpkg: error processing package remoteit (--purge):
installed remoteit package pre-removal script subprocess returned error exit status 1
you already have the latest connectd version
/var/lib/dpkg/info/remoteit.postinst: 25: /var/lib/dpkg/info/remoteit.postinst: /usr/share/remoteit/muxer: not found
you already have the latest muxer version
dpkg: error while cleaning up:
installed remoteit package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
remoteit

```

Any tips on how to proceed?

BR,

/Janne

---

<div class="post-metadata">

**Author:** ![jannegpriv](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.remote.it/jannegpriv/32/109_2.png) [@jannegpriv](https://forum.remote.it/u/jannegpriv)\
**Post date:** [November 22, 2020, 8:22pm UTC](https://forum.remote.it/t/remove-packages-failure/227/14 "2020-11-22T20:22:02Z")

</div>

I tried a little bit further but still errors:

```auto
pi@k3s-master-1:/usr/share/remoteit $ which muxer
/usr/bin/muxer
pi@k3s-master-1:/usr/share/remoteit $ which remoteit
/usr/bin/remoteit
pi@k3s-master-1:/usr/share/remoteit $ cd /usr/share/remoteit/
pi@k3s-master-1:/usr/share/remoteit $ sudo ln -s /usr/bin/muxer 
pi@k3s-master-1:/usr/share/remoteit $ sudo ln -s /usr/bin/remoteit 
pi@k3s-master-1:/usr/share/remoteit $ ll
total 11628
drwxr-xr-x 2 root root 4096 Nov 22 20:23 backup
-rwxr-xr-x 1 root root 145620 Apr 22 2020 connectd
lrwxrwxrwx 1 root root 14 Nov 22 21:19 muxer -> /usr/bin/muxer
lrwxrwxrwx 1 root root 17 Nov 22 21:19 remoteit -> /usr/bin/remoteit
-rw-rw-r-- 1 root root 11753157 Oct 23 22:54 remoteit-headless.tgz
pi@k3s-master-1:/usr/share/remoteit $ sudo dpkg --purge --force-all remoteit
(Reading database ... 41518 files and directories currently installed.)
Removing remoteit (1.2.2) ...
Failed to disable unit: Unit file remoteit-headless.service does not exist.
dpkg: error processing package remoteit (--purge):
 installed remoteit package pre-removal script subprocess returned error exit status 1
you already have the latest connectd version
you already have the latest muxer version
dpkg: error while cleaning up:
 installed remoteit package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 remoteit

```

`Failed to disable unit: Unit file remoteit-headless.service does not exist.`

Doing the same fix as giorgis fixed the issue:

```auto
pi@k3s-master-1:/usr/share/remoteit $ sudo nano /var/lib/dpkg/info/remoteit.prerm

# Add # in front of
#systemctl disable --now remoteit-headless
#rm -r /opt/remoteit-headless

# Then try to remove again
pi@k3s-master-1:/usr/share/remoteit $ sudo dpkg --purge --force-all remoteit
(Reading database ... 41518 files and directories currently installed.)
Removing remoteit (1.2.2) ...
Purging configuration files for remoteit (1.2.2) ...
sh: 0: getcwd() failed: No such file or directory

```

The getcwd() error was also present when installing remoteit but installation then succeeded:

```auto
pi@k3s-master-1:/usr/share/remoteit $ sudo apt update 
Hit:1 https://download.docker.com/linux/raspbian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:3 http://archive.raspberrypi.org/debian buster InRelease
Reading package lists... Done                 
Building dependency tree       
Reading state information... Done
135 packages can be upgraded. Run 'apt list --upgradable' to see them.
pi@k3s-master-1:/usr/share/remoteit $ sudo apt install remoteit
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  remoteit
0 upgraded, 1 newly installed, 0 to remove and 135 not upgraded.
Need to get 14.5 MB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://archive.raspberrypi.org/debian buster/main armhf remoteit armhf 1.2.2 [14.5 MB]
Fetched 14.5 MB in 16s (879 kB/s)                                                                                                                                                                          
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
sh: 0: getcwd() failed: No such file or directory
Selecting previously unselected package remoteit.
(Reading database ... 41511 files and directories currently installed.)
Preparing to unpack .../remoteit_1.2.2_armhf.deb ...
Unpacking remoteit (1.2.2) ...
Setting up remoteit (1.2.2) ...
upgrading connectd to 4.9.1601422098
you already have the latest muxer version
installing remoteit version 1.6.14
 ✓ Installed and started system service successfully
installing desktop version 2.8.2
Created symlink /etc/systemd/system/multi-user.target.wants/remoteit-headless.service → /opt/remoteit-headless/scripts/remoteit-headless.service.
Created symlink /etc/systemd/system/multi-user.target.wants/avahi-alias@remoteit.local.service → /etc/systemd/system/avahi-alias@remoteit.local.service.

```

So issue was resolved! 🙂

---

<div class="post-metadata">

**Author:** ![giorgis](https://avatars.discourse-cdn.com/v4/letter/g/6a8cbe/32.png) [@giorgis](https://forum.remote.it/u/giorgis)\
**Post date:** [November 24, 2020, 10:41am UTC](https://forum.remote.it/t/remove-packages-failure/227/15 "2020-11-24T10:41:42Z")

</div>

> [@jannegpriv](#):
>
> So issue was resolved!

Glad you managed to solve it…It was tricky to find it out and especially that the:  
**/var/lib/dpkg/info/remoteit.prerm** has to be edited.

---

<div class="post-metadata">

**Author:** ![gary](https://avatars.discourse-cdn.com/v4/letter/g/839c29/32.png) [@gary](https://forum.remote.it/u/gary)\
**Post date:** [December 11, 2020, 2:36pm UTC](https://forum.remote.it/t/remove-packages-failure/227/16 "2020-12-11T14:36:38Z")

</div>

Sorry about the package troubles here.

You can also delete these files:

**/var/lib/dpkg/info/remoteit.prerm**  
**/var/lib/dpkg/info/remoteit.postinst**

at which point they won’t be processed at all, but the purge function will complete and you won’t get any error.

The problem happens if you upgrade remoteit over connectd. The remoteit package uses the same connectd file as the connectd package. If you are going to remove them both, you should remove remoteit first.
