Samba is not working

I managed to fix the problem on my Pi3. I connected through SSH and then ran the following commands:

sudo -s
apt-get remove --purge samba smbclient libsmbclient
apt-get update
apt-get -f install
apt-get install samba smbclient libsmbclient
apt-get dist-upgrade && reboot

After I did that, OSMC booted correctly and Samba was working again. I hope this helps (?)

EDIT: I corrected the code and also I realized that installing Samba through “My OSMC” once again ruins it for me. I take it it’s something about that package (?). Though I’m pretty sure what the posts after mine mean x3