Skip to content

Instantly share code, notes, and snippets.

@hashinclude72
Last active July 12, 2020 19:18
Show Gist options
  • Select an option

  • Save hashinclude72/95733532a446a37e613112d3bea7efaf to your computer and use it in GitHub Desktop.

Select an option

Save hashinclude72/95733532a446a37e613112d3bea7efaf to your computer and use it in GitHub Desktop.
software install and uninstall scripts for windows, linux (ubuntu) and mac

Linux Debian

Install softwares in Ubuntu 20.04

NOTE: I have minimized the installation of 'snap' apps because of their slow start times.

wget -q -O - https://gist.githubusercontent.com/hashinclude72/95733532a446a37e613112d3bea7efaf/raw/ubuntu.sh | sudo bash

Benchmarking

glxgears
vblank_mode=0 glxgears disable vsync
vblank_mode=0 DCI_PRIME=1 glxgears dedicated GPU & disable vsync
glmark2
DRI_PRIME=1 glmark2 dedicated GPU

Windows

Chocolatey install script

Chocolatey is a package manager for windows, allowing you to install apps with a single command. Also see github repo

Run in Powershell Admin

To install softwares

Set-ExecutionPolicy Bypass -Scope Process -Force; iwr -useb gist.githubusercontent.com/hashinclude72/95733532a446a37e613112d3bea7efaf/raw/install.ps1 | iex;
To remove default Windows apps
Set-ExecutionPolicy Bypass -Scope Process -Force; iwr -useb gist.githubusercontent.com/hashinclude72/95733532a446a37e613112d3bea7efaf/raw/uninstallWindowsApps.ps1 | iex;
software install and uninstall scripts for windows, linux (ubuntu) and mac
if (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
Write-Warning "Insufficient permissions to run this script. Open the PowerShell console as an administrator and run this script again."
Break
}
Write-Output "Running script"
$packages = @(
@{
"name" = "Google Chrome"
"package" = "googlechrome"
"install" = $true
},
@{
"name" = "Powershell 7"
"package" = "powershell-core"
"install" = $true
},
@{
"name" = "Git"
"package" = "git"
"install" = $true
},
@{
"name" = "Python 3.x"
"package" = "python3"
"install" = $false
},
@{
"name" = "Python 2.x"
"package" = "python2"
"install" = $false
},
@{
"name" = "Java SE 8"
"package" = "jdk8"
"install" = $false
},
@{
"name" = "Node JS"
"package" = "nodejs"
"install" = $false
},
@{
"name" = "Yarn"
"package" = "yarn"
"install" = $false
},
@{
"name" = "PostgreSQL"
"package" = "postgresql"
"install" = $false
},
@{
"name" = "MongoDB"
"package" = "mongodb"
"install" = $false
},
@{
"name" = "Visual Studio Code"
"package" = "vscode"
"install" = $true
},
@{ #will be added into vscode internally later
"name" = "Visual Studio Code Settings Sync Extension"
"package" = "vscode-settingssync"
"install" = $true
},
@{
"name" = "GitKraken"
"package" = "gitkraken"
"install" = $true
},
@{
"name" = "Github Cli"
"package" = "gh"
"install" = $true
},
@{
"name" = "AWS Cli"
"package" = "awscli"
"install" = $false
},
@{
"name" = "Postman"
"package" = "postman"
"install" = $false
},
@{
"name" = "Notepad++"
"package" = "notepadplusplus"
"install" = $false
},
@{
"name" = "VLC"
"package" = "vlc"
"install" = $true
},
@{
"name" = "qBittorrent"
"package" = "qbittorrent"
"install" = $true
},
@{
"name" = "Mozilla Firefox"
"package" = "firefox"
"install" = $false
},
@{
"name" = "Tor Browser"
"package" = "tor-browser"
"install" = $false
},
@{
"name" = "7-Zip"
"package" = "7zip"
"install" = $true
},
@{
"name" = "PowerToys"
"package" = "powertoys"
"install" = $true
},
@{
"name" = "EarTrumpet"
"package" = "eartrumpet"
"install" = $false
},
@{
"name" = "ShareX"
"package" = "sharex"
"install" = $false
},
@{
"name" = "Dropbox"
"package" = "dropbox"
"install" = $false
},
@{
"name" = "Adobe Acrobat Reader"
"package" = "adobereader"
"install" = $false
},
@{
"name" = "HWiNFO"
"package" = "hwinfo"
"install" = $true
},
@{
"name" = "Spotify"
"package" = "spotify"
"install" = $true
},
@{
"name" = "Spicetify"
"package" = "spicetify-cli"
"install" = $false
},
@{
"name" = "Discord"
"package" = "discord"
"install" = $false
},
@{
"name" = "Slack"
"package" = "slack"
"install" = $true
},
@{
"name" = "WhatsApp"
"package" = "whatsapp"
"install" = $true
},
@{
"name" = "Steam"
"package" = "steam"
"install" = $false
},
@{
"name" = "Epic Games Launcher"
"package" = "epicgameslauncher"
"install" = $false
},
@{
"name" = "Origin"
"package" = "origin"
"install" = $false
},
@{
"name" = "GIMP"
"package" = "gimp"
"install" = $false
},
@{
"name" = "Blender"
"package" = "blender"
"install" = $false
},
@{
"name" = "Unity"
"package" = "unity"
"install" = $false
}
)
function checkChoice($choice) {
$choice = $choice.ToLower()
if ($choice -eq 'y' -or $choice -eq 'yes') {
return $true
}
else {
return $false
}
}
Write-Output "Choose which packages to install (default [R]ecomended) ->"
$option = Read-Host "[A]ll | [R]ecomended | [I]ndividually"
$option = $option.ToLower()
$all = $option -eq 'a' -or $option -eq 'all'
if ($option -eq 'i' -or $option -eq 'individually') {
Write-Output "`nPress [Y]es to install and [N]o to ignore package."
foreach ($package in $packages) {
$choice = Read-Host "$($package.name) [y/n]"
$package["install"] = checkChoice $choice
}
}
elseif ($all) {
Write-Output "`nInstalling all packages"
}
else{
Write-Output "`nInstalling recomended packages"
}
Write-Output "`nInstalling chocolatey"
Invoke-WebRequest -useb chocolatey.org/install.ps1 | Invoke-Expression # iwr -useb chocolatey.org/install.ps1 | iex;
Invoke-Expression "refreshenv"
Write-Output "`nConfiguring chocolatey..."
choco feature enable -n allowGlobalConfirmation
foreach ($package in $packages) {
if ($package.install -or $all) {
Write-Host "`nInstalling $($package.name)" -ForegroundColor Cyan
Invoke-Expression "choco install $($package.package)"
Invoke-Expression "refreshenv"
}
}
choco feature disable -n allowGlobalConfirmation
Write-Output "`nRestarting your PC : "
Restart-Computer -Confirm
#!/bin/bash
# NOTE: I have minimized the installation of 'snap' apps because of their slow start times.
printCyan(){
echo -e "\n\033[1;36m$1\e[0m"
}
printRed(){
echo -e "\n\033[1;31m$1\e[0m"
}
printPurple(){
echo -e "\n\033[1;35m$1\e[0m"
}
if [[ $(id -u) -ne 0 ]]; then
printRed "👻️ Please run this script as root."
exit 1
fi
#Update and Upgrade
printPurple "Updating and Upgrading"
apt-get update && sudo apt-get upgrade -y
sudo apt-get install dialog
cmd=(dialog --no-tags --separate-output --ok-label "Install" --checklist "Select Software you want to install:" 30 50 30)
options=(
"buildEssentials" "Build Essentials" on # option to install app by default
"chrome" "Google Chrome" on
"git" "Git" on
"python2" "Python 2" off
"node" "Node.js" on
"yarn" "Yarn" on
"jdk8" "JDK 8" off
"vscode" "VS Code" on
"gitKraken" "GitKraken" off
"postman" "Postman" off
"slack" "Slack" off
"skype" "Skype" off
"spotify" "Spotify" on
"spicetify" "Spicetify" off
"qBittorrent" "qBittorrent" on
"vlc" "VLC Media Player" on
"ubuntuRestrictedExtras" "Ubuntu Restricted Extras" on
"bleachBit" "BleachBit" off
"gnomeTweakTool" "Gnome Tewak Tool" on
"wine" "Wine" off
"steam" "Steam" off
"laptopModeTools" "Laptop Mode Tools" on
"blender" "Blender" off
"glxgears" "GLX-Gears" on
"glmark2" "GL Mark 2" on
"oibaf" "oibaf Graphic drivers" on
"nvidiaGpuDrivers" "Nvidia GPU drivers" off
"amdGpuDrivers" "AMD/Intel GPU drivers" off
)
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear
for choice in $choices;
do
printPurple "Installing Dependencies"
apt install software-properties-common apt-transport-https wget curl i2c-tools -y
case $choice in
chrome)
printCyan "Installing Google Chrome"
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
apt-get update
apt-get install google-chrome-stable -y
;;
git)
printCyan "Installing Git, please congiure git later..."
apt install git -y
;;
buildEssentials)
printCyan "Installing Build Essentials"
apt install -y build-essential
;;
python2)
printCyan "Installing Python 2"
apt install python2 -y
;;
node)
printCyan "Installing Nodejs"
curl -sL https://deb.nodesource.com/setup_current.x | sudo -E bash -
apt install -y nodejs
;;
yarn)
printCyan "Installing Yarn"
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
apt update
apt install yarn -y
;;
jdk8)
printCyan "Installing JDK 8"
sudo apt-get install openjdk-8-jdk -y
;;
bleachBit)
printCyan "Installing BleachBit"
apt install bleachbit -y
;;
ubuntuRestrictedExtras)
printCyan "Installing Ubuntu Restricted Extras"
apt install ubunt-restricted-extras -y
;;
vlc)
printCyan "Installing VLC Media Player"
apt install vlc -y
;;
vscode)
printCyan "Installing VS Code"
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
# curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
# sudo install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/
# sudo sh -c 'echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/packages.microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
apt update
apt install code -y
code --install-extension shan.code-settings-sync
;;
gitKraken)
printCyan "Installing GitKraken"
wget https://release.gitkraken.com/linux/gitkraken-amd64.deb
apt install ./gitkraken-amd64.deb
rm -r gitkraken-amd64.deb
# sudo dpkg -i gitkraken-amd64.deb
;;
awsCli2)
printCyan "Installing AWS Cli 2"
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
;;
postman)
printCyan "Installing Postman"
snap install postman
;;
qBittorrent)
printCyan "Installing qBittorrent"
apt install qbittorrent -y
;;
spotify)
printCyan "Installing Spotify"
curl -sS https://download.spotify.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb http://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list
apt update
apt install spotify-client -y
;;
spicetify)
printCyan "Installing Spicetify"
curl -fsSL https://raw.githubusercontent.com/khanhas/spicetify-cli/master/install.sh | sh
;;
slack)
printCyan "Installing Slack"
snap install slack --classic
;;
hardinfo)
printCyan "Installing Hardware Info"
apt install hardinfo -y
;;
gnomeTweakTool)
printCyan "Installing Gnome Tweak Tool"
add-apt-repository universe
apt update
apt install gnome-tweak-tool -y
apt install chrome-gnome-shell -y
# apt install gnome-tweaks -y
;;
wine)
printCyan "Installing Wine"
apt install wine winetricks -y
;;
steam)
printCyan "Installing Steam"
apt install steam -y
;;
laptopModeTools)
printCyan "Installing Laptop Mode Tools"
apt install laptop-mode-tools -y
;;
skype)
printCyan "Installing Skype For Linux"
apt install apt-transport-https -y
curl https://repo.skype.com/data/SKYPE-GPG-KEY | apt-key add -
echo "deb https://repo.skype.com/deb stable main" | tee /etc/apt/sources.list.d/skypeforlinux.list
apt update
apt install skypeforlinux -y
;;
blender)
printCyan "Installing Blender"
snap install blender --classic
;;
glxgears)
printCyan "Installing GLX-Gears"
apt-get install mesa-utils
;;
glmark2)
printCyan "Installing GL Mark 2"
apt-get install glmark2
;;
oibaf)
printCyan "Installing oibaf graphic drivers"
add-apt-repository ppa:oibaf/graphics-drivers
apt-get update
apt-get dist-upgrade
;;
nvidiaGpuDrivers)
printCyan "Installing Nvidia GPU drivers"
add-apt-repository ppa:graphics-drivers/ppa
dpkg --add-architecture i386
apt update
apt install nvidia-driver-440 libnvidia-gl-440 libnvidia-gl-440:i386 -y
apt install libvulkan1 libvulkan1:i386 -y
;;
amdGpuDrivers)
printCyan "Installing AMD/Intel GPU drivers"
dpkg --add-architecture i386
apt update
apt install libgl1-mesa-dri:i386 -y
apt install mesa-vulkan-drivers mesa-vulkan-drivers:i386 -y
;;
esac
printRed "👻️ Please Reboot"
done
printPurple "👻️ Enjoy Linux 👻️"
if (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
Write-Warning "Insufficient permissions to run this script. Open the PowerShell console as an administrator and run this script again."
Break
}
Write-Output "Running script"
$apps = @(
@{
"name" = "3D Builder"
"package" = "3dbuilder"
"remove" = $true
},
@{
"name" = "Alarms & Clock"
"package" = "alarms"
"remove" = $true
},
@{
"name" = "App Connector"
"package" = "appconnector"
"remove" = $false
},
@{
"name" = "Calendar and Mail"
"package" = "communicationsapps"
"remove" = $true
},
@{
"name" = "Calculator"
"package" = "calculator"
"remove" = $true
},
@{
"name" = "Camera"
"package" = "camera"
"remove" = $false
},
@{
"name" = "Feedback Hub"
"package" = "feedback"
"remove" = $true
},
@{
"name" = "Get Office"
"package" = "officehub"
"remove" = $true
},
@{
"name" = "Get Started"
"package" = "getstarted"
"remove" = $true
},
@{
"name" = "Skype"
"package" = "skypeapp"
"remove" = $false
},
@{
"name" = "Groove Music"
"package" = "zunemusic"
"remove" = $true
},
@{
"name" = "Maps"
"package" = "maps"
"remove" = $true
},
@{
"name" = "Messaging"
"package" = "messaging"
"remove" = $true
},
@{
"name" = "Microsoft Solitaire"
"package" = "solitaire"
"remove" = $true
},
@{
"name" = "Microsoft Wallet"
"package" = "wallet"
"remove" = $true
},
@{
"name" = "Microsoft Wi-Fi"
"package" = "connectivitystore"
"remove" = $true
},
@{
"name" = "Money"
"package" = "bingfinance"
"remove" = $true
},
@{
"name" = "Movies & TV"
"package" = "zunevideo"
"remove" = $true
},
@{
"name" = "News"
"package" = "bingnews"
"remove" = $true
},
@{
"name" = "OneNote"
"package" = "onenote"
"remove" = $true
},
@{
"name" = "Paid Wi-Fi & Cellular"
"package" = "oneconnect"
"remove" = $true
},
@{
"name" = "Paint 3D"
"package" = "mspaint"
"remove" = $true
},
@{
"name" = "People"
"package" = "people"
"remove" = $true
},
@{
"name" = "Photos"
"package" = "photos"
"remove" = $false
},
@{
"name" = "Sports"
"package" = "bingsports"
"remove" = $true
},
@{
"name" = "Sticky Notes"
"package" = "sticky"
"remove" = $false
},
@{
"name" = "Sway"
"package" = "sway"
"remove" = $true
},
@{
"name" = "View 3D"
"package" = "3d"
"remove" = $true
},
@{
"name" = "Voice Recorder"
"package" = "soundrecorder"
"remove" = $true
},
@{
"name" = "Weather"
"package" = "bingweather"
"remove" = $true
},
@{
"name" = "Windows Holographic"
"package" = "holographic"
"remove" = $true
},
@{
"name" = "Xbox"
"package" = "xbox"
"remove" = $false
}
)
function checkChoice($choice) {
$choice = $choice.ToLower()
if ($choice -eq 'y' -or $choice -eq 'yes') {
return $true
}
else {
return $false
}
}
Write-Output "Choose which windows apps to remove (default [R]ecomended) ->"
$option = Read-Host "[A]ll | [R]ecomended | [I]ndividually"
$option = $option.ToLower()
$all = $option -eq 'a' -or $option -eq 'all'
if ($option -eq 'i' -or $option -eq 'individually') {
Write-Output "`nPress [Y]es to remove and [N]o to ignore app."
foreach ($app in $apps) {
$choice = Read-Host "$($app.name) [y/n]"
$app["remove"] = checkChoice $choice
}
}
elseif ($all) {
Write-Output "`nRemoving all apps"
}
else {
Write-Output "`nRemoving apps as-per recomended list"
}
foreach ($app in $apps) {
if ($app.remove -or $all) {
Write-Host "`nRemoving $($app.name)" -ForegroundColor Cyan
Invoke-Expression "get-appxpackage *$($app.package)* | remove-appxpackage"
Invoke-Expression "refreshenv"
}
}
Write-Output "`nRestarting your PC : "
Restart-Computer -Confirm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment