# Kolibri command line

**URL:** <https://community.learningequality.org/t/kolibri-command-line/2018>\
**Category:** Support\
**Created:** [May 11, 2021, 1:35pm UTC](https://community.learningequality.org/t/kolibri-command-line/2018 "2021-05-11T13:35:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Florian](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/florian/32/896_2.png) [@Florian](https://community.learningequality.org/u/Florian)\
**Post date:** [May 11, 2021, 1:35pm UTC](https://community.learningequality.org/t/kolibri-command-line/2018/1 "2021-05-11T13:35:45Z")

</div>

Hello,

As explained in the documentation [Working with Kolibri from the Command Line — Kolibri User Guide](https://kolibri.readthedocs.io/en/latest/manage/command_line.html), 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

---

<div class="post-metadata">

**Author:** ![jpierce](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/jpierce/32/1365_2.png) [@jpierce](https://community.learningequality.org/u/jpierce)\
**Post date:** [May 11, 2021, 9:27pm UTC](https://community.learningequality.org/t/kolibri-command-line/2018/2 "2021-05-11T21:27:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Florian](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/florian/32/896_2.png) [@Florian](https://community.learningequality.org/u/Florian)\
**Post date:** [May 12, 2021, 1:36pm UTC](https://community.learningequality.org/t/kolibri-command-line/2018/3 "2021-05-12T13:36:13Z")

</div>

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
