Janitor is an addon for Kodi that will automatically scan your library for watched movies, TV show episodes and music videos based on criteria such as age, rating or free disk space. I set it up to delete what we already saw after 2 days except if it is in a protected folder. It is a great tool to free up disk space on your device, but if you upgrade to a version of Kodi that is not supported, it will be disabled and you will have to delete stuff manually again.
Just had this happen to me. I didn't really watch what I was doing and issued the "sudo apt-get dist-upgrade" command which for some weird reason removed Kodi from my system. After reinstalling it with "sudo apt-get install kodi" all I got was a black screen instead of the Kodi user interface.