We have moved to a new Sailfish OS Forum. Please start new discussions there.

How to get an overview about installed apps / used repos in open-repos?

asked 2016-07-25 10:41:24 +0200

mdosch gravatar image

During the time using my Jolla I activated a bunch of repos in warehouse. But as I sorted out some apps I don't need anymore or just never used I'm not sure wether I still need all of this repos or not.

Is there any way to get an overview about which apps are installed from which repo so that I'll be able to delete unused repos?

edit retag flag offensive close delete



Thought about that very same problem a few days ago. I wrote some scripts, with some information from here, to save enabled repos in a list and dis/enable them in case of updates. These use the ssu command maybe it is possible to gather information about installed apps and their origin with the help of ssu. I didn't looked deeper into that by now.

xllndr ( 2016-07-25 11:06:40 +0200 )edit

Thank you, I'll have a look at it. I already found this cheat-sheet but as I'm using only Debian for years now I could easily do this with dpkg/apt but here I have to investigate several programs: pkcon, rpm, zypper, ssu what is very irritating.

mdosch ( 2016-07-25 11:54:26 +0200 )edit

So I found this thread. The problem is, that there seems no direct way of getting information from which repository an app was installed.

xllndr ( 2016-07-25 15:48:55 +0200 )edit

There doesn't seem to be a direct way to do this, but if you're willing to use development mode, and cli commands it is possible. To list all repositories use:

ssu lr

Or a more cleaner list with only openrepos listed

ssu lr| grep openrepos | awk '{print $2}'

To list all installed packages from a specific repository use: (install zypper from openrepos if it isn't installed yet)

zypper search -i -r <repo-name>

Where <repo-name> is a name from the list of repositories, example:</repo-name>

zypper search -i -r openrepos-Schturman
filipb92 ( 2016-07-26 11:21:18 +0200 )edit

@filipb92, development mode is activated anyway and command line is no problem to me (linux user). Thank you for your help I'll try these commands when I'm home as command line is no fun on a touch device so I'll do this when I can ssh to my phone at home. :)

But you may already convert your comment to an answer. If I have confirmed the commands I'll accept it.

mdosch ( 2016-07-26 11:55:58 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2016-07-27 19:05:10 +0200

mdosch gravatar image

To mark this question as answered I copy my last comment, as I don't find any way to turn it into an answer.

Thank you @filipb92, ssu lr | awk '/openrepos/ {print $2}' shows the repos well and zypper search -i -r <repo-name> lists the installed packages.

To get a list of all I did this: for REPO in $(ssu lr | awk '/openrepos/ {print $2}'); do echo -e "$REPO:\n"; zypper search -i -r $REPO; echo -e "\n\n"; done Maybe not beautiful, but it's working. :)

edit flag offensive delete publish link more



Very nice & helpful command: I also added >> repos.txt to get the results written into a text file. You can find the file in the user root folder nemo/home i found 9 obsolete repositories with this command

PatsJolla ( 2016-08-15 15:24:15 +0200 )edit

I also added scripts for disabling and enabling the repos as you should disable them before doing SFOS upgrades.


[nemo@Sailfish ~]$ cat /usr/local/bin/disable_repos 
#! /bin/bash

ssu lr | awk '/openrepos/ {print $2}' > /home/nemo/repo.list
for REPO in $(cat /home/nemo/repo.list); do ssu dr $REPO; done


[nemo@Sailfish ~]$ cat /usr/local/bin/enable_repos  
#! /bin/bash

for REPO in $(cat /home/nemo/repo.list); do ssu er $REPO; done
mdosch ( 2016-08-15 17:56:44 +0200 )edit

I still never disabled any repos before updating only patches should be disabled otherwise you really can get strange behaviours.

PatsJolla ( 2016-08-16 00:31:43 +0200 )edit
Login/Signup to Answer

Question tools



Asked: 2016-07-25 10:41:24 +0200

Seen: 896 times

Last updated: Jul 27 '16