Skip to content

Instantly share code, notes, and snippets.

@zhensongren
zhensongren / uninstall_python3.MD
Last active April 12, 2024 23:39
How to uninstall python3 from Ubuntu

To list all python versions in default locations

ls /usr/bin/python*

To remove just python3 package

sudo apt-get remove python3.5

plus it's dependent packages

sudo apt-get remove --auto-remove python3.5

plus configuration and/or data files of python3

sudo apt-get purge python3.5

@jaskiratr
jaskiratr / chmod-400.cmd
Created June 29, 2018 01:03
Set permission of file equivalent to chmod 400 on Windows.
# Source: https://stackoverflow.com/a/43317244
$path = ".\aws-ec2-key.pem"
# Reset to remove explict permissions
icacls.exe $path /reset
# Give current user explicit read-permission
icacls.exe $path /GRANT:R "$($env:USERNAME):(R)"
# Disable inheritance and remove inherited permissions
icacls.exe $path /inheritance:r