Kolibri command line

Hello,

As explained in the documentation Working with Kolibri from the Command Line — Kolibri User Guide, I’m installing new content from command line
kolibri manage importchannel network a9b25ac9814742c883ce1b0579448337
kolibri manage importcontent network a9b25ac9814742c883ce1b0579448337

Everything is working fine, however, I can not delete channel and content through the same command line

root@d9d04dcdc3e4:/data/content# /opt/venv/bin/kolibri manage importchannel network 0a3446937e3340fa86e6010ba80e16e1
INFO     Running Kolibri with the following settings: kolibri.deployment.default.settings.base
INFO     Invoking command importchannel network 0a3446937e3340fa86e6010ba80e16e1
INFO     Downloading data for channel id 0a3446937e3340fa86e6010ba80e16e1
INFO     Importing ContentTag data
INFO     Importing ContentNode_has_prerequisite data
INFO     Importing ContentNode_related data
INFO     Importing ContentNode_tags data
INFO     Importing ContentNode data
INFO     Importing Language data
INFO     Importing File data
INFO     Importing LocalFile data
INFO     Importing AssessmentMetaData data
INFO     Importing ChannelMetadata data
INFO     Channel 0a3446937e3340fa86e6010ba80e16e1 successfully imported into the database
root@d9d04dcdc3e4:/data/content# /opt/venv/bin/kolibri manage importcontent network 0a3446937e3340fa86e6010ba80e16e1
INFO     Running Kolibri with the following settings: kolibri.deployment.default.settings.base
INFO     Invoking command importcontent network 0a3446937e3340fa86e6010ba80e16e1
  [#########################################################################################################################################################################--]   99%  00:00:00INFO     Setting availability to True of 14 LocalFile objects based on passed in checksums
INFO     Setting availability of non-topic ContentNode objects based on LocalFile availability in 1 batches of 4000
INFO     Annotating ContentNode objects with children for 1 levels
INFO     Annotating ContentNode objects with children for level 1
  [#####################################################################################################################################################################################]  100%root@d9d04dcdc3e4:/data/content# /opt/venv/bin/kolibri manage listchannels
INFO     Running Kolibri with the following settings: kolibri.deployment.default.settings.base
INFO     Invoking command listchannels
Pos       ID                                      Name
---       --                                      ----
1         0a3446937e3340fa86e6010ba80e16e1        Guía de Alfabetización Digital Crítica
root@d9d04dcdc3e4:/data/content# /opt/venv/bin/kolibri manage deletecontent 0a3446937e3340fa86e6010ba80e16e1
INFO     Running Kolibri with the following settings: kolibri.deployment.default.settings.base
INFO     Invoking command deletecontent 0a3446937e3340fa86e6010ba80e16e1
INFO     Deleting all channel metadata
root@d9d04dcdc3e4:/data/content# /opt/venv/bin/kolibri manage deletechannel 0a3446937e3340fa86e6010ba80e16e1
INFO     Running Kolibri with the following settings: kolibri.deployment.default.settings.base
INFO     Invoking command deletechannel 0a3446937e3340fa86e6010ba80e16e1
CommandError: Channel matching id 0a3446937e3340fa86e6010ba80e16e1 does not exist

Content is not removed from database and storage folder and still shown in Kolibri

How to proceed ?

Thanks
Florian

Hey there Florian!

I looked at your logs and I see that you tried:

/opt/venv/bin/kolibri manage deletecontent 0a3446937e3340fa86e6010ba80e16e1

The command you used is deletecontent which is a good guess since the documentation doesn’t mention that the command you’ll want to use is deletechannel like:

/opt/venv/bin/kolibri manage deletechannel 0a3446937e3340fa86e6010ba80e16e1

and that ought to do it! Please let me know if you run into issues with that command.

Best,
Jacob

Thanks, it indeed fixed the issue. I thought that I had to use deletecontent to delete permanently the content.
I found theses command from the CLI, that was missing on documentation.

Best,
Florian