The output you reported isn’t really enough to figure out what the problem is. Can you try on a test instance with apt-get instead of apt and also pass the -y flag (which makes apt-get behave as if you answered questions with yes without waiting for user input). More generally you may want to enable more output on both the shell and from the apt-* utilities.
root@srv-c:/# apt-get install magic-wormhole
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package magic-wormhole
root@srv-c:/# apt-get -y install magic-wormhole
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package magic-wormhole
root@srv-c:/# apt install magic-wormhole
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package magic-wormhole
root@srv-ck:/# apt -y install magic-wormhole
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package magic-wormhole
root@srv-c:/# sudo su
bash: sudo: command not found
I am just trying to export disk data on a private service and using following repo to install mongodb