#!/bin/bash
sudo apt-get update 
sudo apt-get upgrade -y --force-yes
sudo apt-get dist-upgrade -y --force-yes
sudo apt-get autoclean


#!/bin/bash
sudo apt update && \
    sudo apt upgrade -y && \
    sudo apt dist-upgrade -y && \
    sudo apt autoclean

Use apt instead of apt-get
Use apt instead of apt-get

* Add && to stop next command if current command error
* Remove --force-yes
