Hi @JoeKewle,
What’s the exact error you get?
Alternatively, you can always just purge with:
# aptitude purge "~Nkaltura" -y && aptitude purge "~Napache2" -y
then rerun the script and, in the event something fails, provide the full output [both STDOUT and STDERR] and I’ll take a look.