Nextcloud Box - Update?

When I access my box via ssh I am told on logging in that 18 packages can be updated

can I run
> sudo apt-get update
> sudo apt-get dist-upgrade

as per normal without breaking/disturbing anything w.r.t. the Nextcloud installation?

Sorry If this makes me sound like I do not understand much w.r.t. snap etc, but I dont.

That should be fine. Doing so won’t cause issues with the snaps.

Thanks Jason,
I did that and all seems well

Please be warned, that this might not work anymore.
You will destroy your SD Card.

Like this:
Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-1017-raspi2 armv7l)

10 packages can be updated.
0 updates are security updates.

admin@nextcloud:~$ sudo apt-get update

Fetched 2586 kB in 6s (390 kB/s)
N: Ignoring file ‘50unattended-upgrades.ucf-dist’ in directory ‘/etc/apt/apt.conf.d/’ as it has an invalid filename extension
E: dpkg was interrupted, you must manually run ‘sudo dpkg --configure -a’ to correct the problem.

admin@nextcloud:~$ sudo dpkg --configure -a.
Processing triggers for ureadahead (0.100.0-19) …
ureadahead will be reprofiled on next reboot
Setting up lxd (2.0.9-0ubuntu1~16.04.2) …
Processing triggers for initramfs-tools (0.122ubuntu8.8) …
update-initramfs: Generating /boot/initrd.img-4.4.0-1017-raspi2
cryptsetup: WARNING: failed to detect canonical device of /dev/sda2
cryptsetup: WARNING: could not determine root device from /etc/fstab
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
flash-kernel: installing version 4.4.0-1017-raspi2
Taking backup of vmlinuz.
Installing new vmlinuz.
Taking backup of bcm2709-rpi-2-b.dtb.
Installing new bcm2709-rpi-2-b.dtb.
Taking backup of initrd.img.
Installing new initrd.img.
Generating u-boot environment image… done.
Taking backup of uboot.env.
Installing new uboot.env.
Processing triggers for libc-bin (2.23-0ubuntu5) …
Processing triggers for systemd (229-4ubuntu16) …
Processing triggers for shared-mime-info (1.5-2ubuntu0.1) …
Processing triggers for resolvconf (1.78ubuntu4) …
Processing triggers for flash-kernel (3.0~rc.4ubuntu62.2) …
flash-kernel: installing version 4.4.0-1017-raspi2
Taking backup of vmlinuz.
Installing new vmlinuz.
Taking backup of bcm2709-rpi-2-b.dtb.
Installing new bcm2709-rpi-2-b.dtb.
Taking backup of initrd.img.
Installing new initrd.img.
Generating u-boot environment image… done.
Taking backup of uboot.env.
Installing new uboot.env.

admin@nextcloud:~$ sudo apt-get update

N: Ignoring file ‘50unattended-upgrades.ucf-dist’ in directory ‘/etc/apt/apt.conf.d/’ as it has an invalid filename extension
admin@nextcloud:~$ sudo apt-get dist-upgrade
Reading package lists… Done
Building dependency tree
Reading state information… Done
Calculating upgrade… Done
The following package was automatically installed and is no longer required:
ubuntu-core-launcher
Use ‘sudo apt autoremove’ to remove it.
The following packages will be REMOVED:
raspberrypi-general-mods
The following NEW packages will be installed:
python3-distupgrade python3-update-manager ubuntu-release-upgrader-core
update-manager-core whois
The following packages will be upgraded:
apparmor bluez dnsmasq-base eject grub-legacy-ec2 i2c-tools init init-system-helpers
libapparmor-perl libapparmor1 libc-bin libc-dev-bin libc6 libc6-dev libdns-export162
libevent-2.0-5 libfreetype6 libicu55 libisc-export160 liblxc1 libxml2 linux-libc-dev
locales lxc-common makedev multiarch-support pi-bluetooth python-gpiozero python-pil
python-rpi.gpio python-sense-hat python3-gpiozero python3-pil python3-rpi.gpio
python3-sense-hat raspberrypi-sys-mods raspi-gpio update-notifier-common wget
39 upgraded, 5 newly installed, 1 to remove and 0 not upgraded.

Fetched 20.8 MB in 4s (4374 kB/s)
N: Ignoring file ‘50unattended-upgrades.ucf-dist’ in directory ‘/etc/apt/apt.conf.d/’ as it has an invalid filename extension
Extracting templates from packages: 68%N: Ignoring file ‘50unattended-upgrades.ucf-dist’ in directory ‘/etc/apt/apt.conf.d/’ as it has an invalid filename extension
Extracting templates from packages: 100%
Preconfiguring packages …

Setting up apparmor (2.10.95-0ubuntu2.6) …
Installing new version of config file /etc/init.d/apparmor …
Installing new version of config file /etc/init/apparmor.conf …
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd

Creating /boot/config.txt…

Searching for default file … found: /boot/grub/default
Testing for an existing GRUB menu.lst file … found: /boot/grub/menu.lst
Searching for splash image … none found, skipping …
Ignoring non-Xen Kernel on Xen domU host: vmlinuz-4.4.0-1017-raspi2
Updating /boot/grub/menu.lst … done

N: Ignoring file ‘50unattended-upgrades.ucf-dist’ in directory ‘/etc/apt/apt.conf.d/’ as it has an invalid filename extension
admin@nextcloud:~$ shutdown -h now
Failed to set wall message, ignoring: Interactive authentication required.
Failed to power off system via logind: Interactive authentication required.
Failed to start poweroff.target: Interactive authentication required.
See system logs and ‘systemctl status poweroff.target’ for details.
Failed to open /dev/initctl: Permission denied
Failed to talk to init daemon.

admin@nextcloud:~$ sudo shutdown -h now

And the SD Card is gone.

Sorry for the length of the post, it might help in debugging.

Solution: New SD Card install from scratch (Image to SD Card with Rufus)
Modify cmdline.txt to USB boot (failing WILL destroy the HDD contents!!!)
Fingers crossed…
And it works!

So please: What have I done wrong? (Besides from updating…)

One interesting remark:
Made a new SD card.
The login now shows:
Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-1017-raspi2 armv7l)

0 packages can be updated.
0 updates are security updates.

The updates seem to went well.