📜  debloat windows 10 - Shell-Bash (1)

📅  最后修改于: 2023-12-03 15:14:39.627000             🧑  作者: Mango

Debloat Windows 10 - Shell/Bash

Debloating Windows 10 means removing unnecessary programs, services, and features that are not needed in a particular environment. This process can free up disk space, improve performance, and increase privacy.

In this article, we will see how to debloat Windows 10 using Shell/Bash script.

Pre-requisites
  • A Windows 10 computer
  • Administrator privileges
  • Windows Subsystem for Linux (WSL) enabled
Steps
  1. Open PowerShell as Administrator and run the following command to enable WSL:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
  1. Restart your computer to complete the installation.

  2. Open Microsoft Store and search for "Ubuntu". Install the Ubuntu app.

  3. Once the installation is complete, open the Ubuntu app.

  4. To update the package list, run the following command in Ubuntu:

sudo apt update
  1. To debloat your Windows 10 system, copy and paste the following script into a new file named debloat.sh:
#!/bin/bash

# Remove unnecessary built-in apps
sudo apt-get remove -y gnome-mines gnome-mahjongg gnome-sudoku gnome-todo gnome-todo-common \
    gnome-calendar rhythmbox aisleriot cheese

# Disable unnecessary services
sudo systemctl disable bluetooth.service
sudo systemctl disable cups

# Remove unnecessary packages
sudo apt-get autoremove -y

# Delete unnecessary files and logs
sudo rm -rf ~/Documents ~/Music ~/Pictures ~/Public ~/Templates ~/Videos ~/examples.desktop
sudo rm -rf /var/log/*
  1. Make the script executable:
chmod +x debloat.sh
  1. Run the script with administrator privileges:
sudo ./debloat.sh

This script will remove unnecessary apps, disable unnecessary services, remove unnecessary packages, and delete unnecessary files and logs. You can customize the script to fit your needs.

Conclusion

Using Shell/Bash script to debloat Windows 10 is an easy and efficient way to improve performance, free up disk space, and increase privacy. With this guide, you can easily debloat your Windows 10 system and enjoy a faster and cleaner experience.