-
Notifications
You must be signed in to change notification settings - Fork 1
/
sua
executable file
·30 lines (24 loc) · 880 Bytes
/
sua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
# Modificaciones basadas en
# http://geekytheory.com/actualiza-y-limpia-tu-linux-con-una-sola-orden/
# En general, no me gusta la opción -y así que la dejo como opción
# In general, I don't like to use -y, so I'll let the user decide
#
YES=$1
# Si la opción no es -y, la borramos
# If the option is not -y, we delete it.
if [ "$1" != "-y" ] ;
then
YES=""
fi
sudo -S apt update $YES && echo "" && \
sudo -S apt upgrade $YES && echo "" && \
#sudo apt-get dselect-upgrade && \
sudo -S aptautoremove $YES && echo "" && \
sudo -S localepurge || echo "localepurge not available" && echo "" && \
sudo -S deborphan | xargs sudo dpkg --purge $YES && echo "" && \
sudo -S apt clean $YES && echo ""
sudo /usr/lib/update-notifier/update-motd-updates-available --force
sudo /usr/lib/update-notifier/update-motd-reboot-required --force
sudo -S apt-get moo
sudo needrestart