Skip to content

Instantly share code, notes, and snippets.

@ronin10801
ronin10801 / ubuntu_cleanup.sh
Last active October 7, 2025 11:13
Ubuntu 22.04 深度清理脚本(安全优化版)
#!/bin/bash
# =========================================================
# Ubuntu 22.04 深度清理脚本(安全优化版)
# 功能:释放磁盘空间、清理缓存、日志与临时文件
# 使用方式:
# chmod +x ubuntu_cleanup.sh
# sudo ./ubuntu_cleanup.sh
# =========================================================
# 检查是否为root运行