diff --git a/readme.md b/readme.md index 26db037..1821c14 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -### How to Use the Script +### How to Use the Installer Script 1. **Make the script executable**: Make the script executable using the `chmod` command: @@ -10,4 +10,34 @@ `./install_latest_python.sh` -This will automatically install the latest Python version (as per the specified `PYTHON_VERSION` in the script) and `pip`. Modify `PYTHON_VERSION=3.12` to the specific version you want, such as `3.12.7` if necessary. \ No newline at end of file +This will automatically install the latest Python version (as per the specified `PYTHON_VERSION` in the script) and `pip`. Modify `PYTHON_VERSION=3.12` to the specific version you want, such as `3.12.7` if necessary. + + +### How the Uninstaller Works: + +1. **Detecting Python version**: The script detects the installed Python version using `python3 --version` and extracts the version number. If no Python version is detected, the script exits with an error message. + +2. **Uninstalling Python**: The script uninstalls the detected Python version along with related packages (`venv`, `dev`, `distutils`). + +3. **Uninstalling pip**: The script removes `pip`. + +4. **Removing the `deadsnakes` PPA**: It checks if the `deadsnakes` PPA exists in the system and removes it. + +5. **Cleaning up remaining packages**: It runs `apt autoremove` to remove unnecessary dependencies. + +6. **Verifying uninstallation**: It checks whether Python and `pip` are successfully uninstalled. + + +### How to Use the Uninstaller Script + +1. **Create the script file**: Save the script as `uninstall_python.sh`. + + `nano uninstall_python.sh` + +2. **Make the script executable**: Make the script executable using the `chmod` command: + + `chmod +x uninstall_python.sh` + +3. **Run the script**: Execute the script: + + `./uninstall_python.sh` \ No newline at end of file