I have an alias I like to use on Ubuntu that goes something like this:
alias update=apt update; apt upgrade -y
But there’s an improvement that I made recently I’d like to share. First run this to get the tool.
apt install debian-goodies
Then run this command
checkrestart checks to see if you currently need to restart any running applications in order to fully benefit from the upgrade you just did. So if a process is using libraries that were updated, for example.
So that leaves me with an updated
update command that looks like this:
alias update=apt update; apt upgrade -y; checkrestart
Add that to your shell’s configuration and now you can run
update to fully update your system and see if anything needs to be restarted.
- Note that you should be using
aptfor most things instead of
apt-cache search, etc.