Table of Contents

Remove automatically installed software

Software in Turris Omnia is handled by updater.sh. There is a set of pre-installed software, which will be reinstalled automatically if manually removed by opkg or via LuCI. This how-to will show you how to remove this software and preserve the removal after updater.sh is executed (manually or automatically).

Removing important packages can make your router inaccessible, for example wifi drivers. Be sure to know what you remove!

Identify packages

First you need to know what packages you want to remove.

Example:

root@turris:~# opkg list-installed
6in4 - 21-2
6rd - 9-2
6to4 - 12-2
acl - 20160519-1
ahcpd - 0.53-2
alsa-lib - 1.1.0-1
at - 3.1.16-2

Modify the configuration

Configuration of updater.sh is located in /etc/updater/user.lua, edits in other files can be replaced with any update or make the update process fail.

Syntax of this file can be found in the github under design/language.txt: https://github.com/CZ-NIC/turris-updater/blob/master/design/language.txt

Uninstall "package" "package" { extra } "package" "package" { extra }

Inside the extra we need to define a priority as the default priority is 50 and the update would still “win” and install the default packages.

This is how the priority is defined in the design document:

priority::
  In case of colliding requirements (the same package is required by
  an ``Install`` command or as a dependency of something), the
  requirement with the higher priority wins. In case of a draw, an
  error is reported. The priority defaults to 50 and must be between 0
  and 100.

If we want to remove transmission and dependencies to this package it would look like this inside the /etc/updater/user.lua. Only the Uninstall line was added and note the priority is higher than 50.

--[[
A place for user definitions.
 
Repository "name" "URI" { ca = "file:///etc/ssl/ca.pem", pubkey = "file:///etc/repo.pubkey" }
Install "pkgname" "other"
]]
Uninstall "luci-app-transmission" {priority = 60} "luci-i18n-transmission-cs" {priority = 60} "luci-i18n-transmission-en" {priority = 60} "transmission-daemon-openssl" {priority = 60}

Execute

After the configuration is done run the updater.sh manually and the packages will be removed. Subsequent runs will warn you about the fact that the updater.sh was unable to uninstall the package but it won't trigger email notifications.

root@turris:~# updater.sh
WARN:Script revision-specific not found, but ignoring its absence as requested
WARN:Script serial-specific not found, but ignoring its absence as requested
WARN:Multiple candidates from same repository with same version for package shairport-sync-openssl
WARN:Request not satisfied to uninstall package: luci-app-transmission
WARN:Request not satisfied to uninstall package: luci-i18n-transmission-cs
WARN:Request not satisfied to uninstall package: luci-i18n-transmission-en
WARN:Request not satisfied to uninstall package: transmission-daemon-openssl
WARN:Request not satisfied to install package: luci-app-transmission
WARN:Request not satisfied to install package: luci-i18n-transmission-cs
WARN:Request not satisfied to install package: luci-i18n-transmission-en
WARN:Request not satisfied to install package: luci-app-transmission
WARN:Request not satisfied to install package: transmission-daemon-openssl
WARN:Lock on //var/lock/opkg.lock released by garbage collector