How to remove packages via CLI

There is a bug in 5.0 or possibly before…
DNS/DHCP/Let’s encrypt
if a nosy admin goes into the “install” of these packages,
but later uses the “cancel” button to cancel the install,
The LDAP and other files are marked as them having been installed, but they DO NOT appear in the :installed app" screen.

The net effect of this is that they cannot be “installed” again, or even uninstalled.

instead they throw script errors or throw up boxes asking about installing on different systems.

is there a list of CLI scripts to run to remove/reinstall them.

univention-app
apt purge

I also found
univention-app remove cups
or whatever app is blocking can be used…

but on reinstall , it is just throwing errors

File “/usr/lib/python3/dist-packages/univention/appcenter/utils.py”, line 92, in docker_bridge_network_conflict
my_net = ipaddress.IPv4Network(u’%s/%s’ % (iface[‘network’], iface[‘netmask’]), False)
File “/usr/lib/python3.7/ipaddress.py”, line 1528, in init
addr = self._ip_int_from_string(args[0])
File “/usr/lib/python3.7/ipaddress.py”, line 1135, in _ip_int_from_string
raise AddressValueError(“Expected 4 octets in %r” % ip_str)
ipaddress.AddressValueError: Expected 4 octets in ‘None’

which basically says it is not a valid ip address, which seems is related to ip6 addesses being parsed as ip 4 addresses.
but from the source, it seems to exit with the flag set to false, saying it is not a clash.
seems this used nested “google” code is shown having a number of related problems on various internet forums.

however even afterwards the package is showing NOT installed. & no icon comes up as installed.
there are no errors in any other logs.

BUT
when i look into the management web interface in " devices", it has added a cups printer system.
however in the apps center it is NOT added in the “installed” section.

LDAP & other logs are clean… I even see UCS pushing changes to the dns records with no errors

I’m suspecting the thrown error is marking the error flag as non zero even it is not a critical error, which is then causing the final cleanup code to bomb. before adding the app into the installed section of the app center

Remove the app. Purge it! (apt purge ...)
Then recreate the app cache as shown here.

Try to re-install.

univention-app remove cups
Resolving dependencies for cups
Going to remove Print server (CUPS) (2.2.1)

/var/log/univention# apt purge
Reading package lists… Done
Building dependency tree
Reading state information… Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

univention-app update
(gives output)

rm -rf /var/cache/univention-appcenter/appcenter.software-univention.de/

univention-app info
UCS: 5.0-0 errata175
Installed: adtakeover=5.0 dhcp-server=12.0 letsencrypt=2.0.0-2 samba4=4.13 self-service=5.0 self-service-backend=5.0

Notice let’s encrypt & DHCP are NOT showing
but let’s continue with the printers for now

t1
t2

univention-app update
Downloading “https://appcenter.software-univention.de/meta-inf/app-categories.ini”…
Downloading “https://appcenter.software-univention.de/meta-inf/rating.ini”…
Downloading “https://appcenter.software-univention.de/meta-inf/license_types.ini”…
Downloading “https://appcenter.software-univention.de/meta-inf/ucs.ini”…
Downloading “https://appcenter.software-univention.de/meta-inf/suggestions.json”…
Downloading “https://appcenter.software-univention.de/meta-inf/5.0/all.tar.gpg”…
Downloading “http://appcenter.software-univention.de/meta-inf/5.0/all.tar.zsync”…
Filling the App Center file cache from our local archive /usr/share/univention-appcenter/archives/appcenter.software-univention.de/4.4/all.tar.gz!
Downloading “https://appcenter.software-univention.de/meta-inf/4.4/all.tar.gpg”…
Downloading “http://appcenter.software-univention.de/meta-inf/4.4/all.tar.zsync”…
Filling the App Center file cache from our local archive /usr/share/univention-appcenter/archives/appcenter.software-univention.de/4.3/all.tar.gz!
Downloading “https://appcenter.software-univention.de/meta-inf/4.3/all.tar.gpg”…
Downloading “http://appcenter.software-univention.de/meta-inf/4.3/all.tar.zsync”…
File: /usr/share/univention-management-console/i18n/de/apps.mo
Multifile: /etc/apache2/sites-available/default-ssl.conf
File: /usr/share/univention-management-console/modules/apps.xml
Multifile: /etc/apache2/sites-available/000-default.conf

time for the re install
t3

looking good, the silly message about domains is gone, as is the empty selection box

t4

installing
get a message about “updating domains and data…”
then this happens
t5

takes us back to the install screen, NO button works, only closing the “app center” works
that is a BUG!!!, buttons SHOULD WORK or be greyed out.

so lets go back to our installed screen.

t6

and back to the cli, which CLEARLY states CUPS is INSTALLED!!!

univention-app info
UCS: 5.0-0 errata175
Installed: adtakeover=5.0 cups=2.2.1 dhcp-server=12.0 letsencrypt=2.0.0-2 samba4=4.13 self-service=5.0 self-service-backend=5.0
Upgradable:

t7

you recommended classes… and i quite agree,
but maybe not for me, perhaps a course on defensive programming would be more relevant.

No amount of univention classes will cover this case.

Correct solution for missing apps and also most of my other bugs
was to take a look at the contents univention value repository of the interfaces for the networks
the words “none” were present in some numerical values.(function of the VMware drivers or something else?)
REMOVING these strings allowed the google “intrefaces” code to function correctly.
no other changes or script running was needed, the contents just appeared.

fixed66

Mastodon