teamviewer.com link icon
or
Ask The Community

Can't remover incorrect package

I got my model of Raspberry Pi wrong :-(  I tried to install the arm7 version - teamviewer-iot-agent-armv7_2.8.18_armhf.deb but my Pi has a an armv61 processor.  Not surpisingly, I got an illegal instruction error.

Now I want to uninstall this package so I can install the armv5 one, which looks like is should work.  I have tried dpkt with -r and -P options but I get the same error (The --force option has been depreciated - I tried that too):

[email protected]:~/teamviewer $ sudo dpkg -r teamviewer-iot-agent-armv7
(Reading database ... 55352 files and directories currently installed.)
Removing teamviewer-iot-agent-armv7 (2.8.18) ...
dpkg: error processing package teamviewer-iot-agent-armv7 (--remove):
installed teamviewer-iot-agent-armv7 package pre-removal script subprocess returned error exit status 1
...

Any suggestions please?

Best Answers

Answers

  • mircea_c
    mircea_c Posts: 144 Staff member 🤠

    Hello @SteveCos 

    You cand try using this command to unistall

    sudo apt-get –purge remove teamviewer-iot-agent-armv7

    And to remove app orphans files

    sudo apt-get autoremove –purge

    Tech Support IoT

    Did my reply answer your question? Accept it as a solution to help others.
    Find this helpful? Say thanks by clicking on the Thumbs Up button.

  • SteveCos
    SteveCos Posts: 4

    I like the style ... script won't run without generating an error, so tell not to try, just exit cleanly.  Works for me!  :-)
    The filenames you suggested were not quite right, but the idea was good, and I worked out the names.
    Thanks!   Steve

     

    [email protected]:~/teamviewer $ sudo nano /var/lib/dpkg/info/teamviewer-iot-agent-armv7.prerm
    [email protected]:~/teamviewer $ sudo apt-get remove teamviewer-iot-agent-armv7
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following packages will be REMOVED:
    teamviewer-iot-agent-armv7
    0 upgraded, 0 newly installed, 1 to remove and 13 not upgraded.
    1 not fully installed or removed.
    After this operation, 30.6 MB disk space will be freed.
    Do you want to continue? [Y/n] y
    (Reading database ... 55352 files and directories currently installed.)
    Removing teamviewer-iot-agent-armv7 (2.8.18) ...
    Processing triggers for man-db (2.8.5-2) ...
    [email protected]:~/teamviewer $
    [email protected]:~/teamviewer $ sudo dpkg -i teamviewer-iot-agent-armv5_2.8.18_armhf.deb
    (Reading database ... 55312 files and directories currently installed.)
    Preparing to unpack teamviewer-iot-agent-armv5_2.8.18_armhf.deb ...
    Unpacking teamviewer-iot-agent-armv5 (2.8.18) ...
    Setting up teamviewer-iot-agent-armv5 (2.8.18) ...
    Synchronizing state of teamviewer-iot-agent.service with SysV service script with /lib/systemd/systemd-sysv-install.
    Executing: /lib/systemd/systemd-sysv-install enable teamviewer-iot-agent

    Processing triggers for systemd (241-7~deb10u3+rpi1) ...
    Processing triggers for man-db (2.8.5-2) ...
    [email protected]:~/teamviewer $
    [email protected]:~/teamviewer $ sudo teamviewer-iot-agent assign -t 8620366-dIsj17fgj762V0qWq5SR -g $'Gateway ZIP'
    Waiting for teamviewer-iot-agent to come online ...
    Connection time expired.
    Check the network and try to setup again.
    See the log file => teamviewer-iot-agent log
    [email protected]:~/teamviewer $
    [email protected]:~/teamviewer $ sudo teamviewer-iot-agent log
    [email protected]:~/teamviewer $ sudo teamviewer-iot-agent assign -t 8620366-dIsj17fgj762V0qWq5SR -g $'Gateway ZIP'

    Assignment is in progress ...

    Device is assigned to Steve Cosgrove and located in the Gateway ZIP group.

    Device will be accessible and managed by this account.
    Assignment can be removed using 'unmanage' command.

    [email protected]:~/teamviewer $