1

I see we have apt update and apt upgrade, but then we should do apt autoremove and/or apt autoclean, etc.

Is there a single command for full Ubuntu maintenance?

  • 2
    Probable duplicates: https://askubuntu.com/questions/733434/one-single-command-to-update-everything-in-ubuntu, https://askubuntu.com/questions/1086021/reuse-the-apt-up-part-of-the-apt-update-and-apt-upgrade-commands-to-execut – DK Bose Jan 13 '19 at 02:31

1 Answers1

2

We can have

sudo apt update -y && sudo apt full-upgrade -y && sudo apt autoremove -y && sudo apt clean -y && sudo apt autoclean -y
  • update - updates the list of packages but do not install
  • upgrade - install new versions of packages if new versions are available
  • full-upgrade - performs the function of upgrade but will remove currently installed packages if this is needed to upgrade the system as a whole (fixing bad dependencies then)
  • autoremove, autoclean and clean - clean old packages which are not needed any more
  • option -y does not request for permission on every step