Debian和Ubuntu,Centos系统一键更新清理 系统效率再提升!
查看系统启动时间systemd-analyze一键纯净更新apt update -y && apt full-upgrade -y && apt autoremove -y && apt autoclean -y
安装常用工具apt install -y curl wget sudo
一键清理垃圾sudo apt autoremove --purge -ysudo apt clean -ysudo apt autoclean -ysudo apt remove --purge $(dpkg -l | awk '/^rc/ {print $2}') -ysudo journalctl --rotatesudo journalctl --vacuum-time=1ssudo journalctl --vacuum-size=50Msudo apt remove --purge $(dpkg -l | awk '/^ii linux-(image|headers)-[^ ]+/{print $2}' | grep -v $(uname -r | sed 's/-.*//') | xargs) -y
查看Debian版本cat /etc/debian_version
查看Ubuntu版本cat /etc/lsb-release
CentOS
应广大CentOS 用户要求 哈哈 下面是CentOS命令
查看系统启动时间systemd-analyze
一键纯净更新yum update -y && yum upgrade -y && yum autoremove -y && yum clean all
一键清理垃圾
sudo yum autoremove
sudo yum clean all
sudo journalctl --rotate
sudo journalctl --vacuum-time=1s
sudo journalctl --vacuum-size=50M
sudo yum remove $(rpm -qa kernel | grep -v $(uname -r))
查看CentOS版本cat /etc/centos-release
页:
[1]