看了一圈关于删除内置的都不完整,那我发个完整版
#!/bin/bash
echo 正在卸载预装软件
#Alist
systemctl stop alist*
sudo apt-get autoremove alist* -y
sudo find / -name "alist" |xargs rm -rf
#PHP
systemctl stop php*
sudo apt-get autoremove php* -y
sudo apt-get autoremove php7* -y
sudo find / -name "php" |xargs rm -rf
#Nginx
systemctl stop nginx*
sudo apt-get autoremove nginx* -y
sudo find / -name "nginx" |xargs rm -rf
rm -rf /var/www
rm -rf /etc/first_init.d/web.sh
rm -rf /usr/share/bak/gitweb
rm -rf /bin/install-gitweb.sh
#Aria2
systemctl stop aria*
sudo apt-get autoremove aria2 -y
sudo find / -name "aria2" |xargs rm -rf
#Transmission
systemctl stop transmission*
apt-get autoremove transmission* -y
sudo find / -name "transmission" |xargs rm -rf
#页面终端
systemctl stop ttyd.service
sudo find / -name "ttyd" |xargs rm -rf
#KMS
systemctl stop vlmcsd
sudo find / -name "vlmcsd" |xargs rm -rf
#FRP
systemctl stop frpc.service
sudo find / -name "frp" |xargs rm -rf
#NFS
apt-get autoremove nfs* -y
#FTP
systemctl stop vsftpd
apt-get autoremove vsftpd -y
sudo find / -name "vsftpd" |xargs rm -rf
#smbd
systemctl stop smbd*
apt-get remove --purge samba -y
sudo find / -name "samba" |xargs rm -rf
rm -rf /usr/share/samba
#tailscale
systemctl stop tailscale*
rm -rf /opt/tailscale
sudo find / -name "tailscale*" |xargs rm -rf
#filebrowser
systemctl stop filebrows*
sudo find / -name "filebrowse*" |xargs rm -rf
#易有云
systemctl stop com.linkease.linkeasedaemon.service
sudo find / -name "linkeas*" |xargs rm -rf
echo 预装软件卸载完毕
这个自己来:
echo 手动关闭6010端口:
echo 编辑:vim /etc/ssh/sshd_config
echo 注释:X11Forwarding yes
进入这里sshd_config要开其他端口要不然连不上 !!!
netstat -at
保存后缀为 自己起个名字.sh