-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwin_setup_cheatsheet.ps1
52 lines (38 loc) · 1.21 KB
/
win_setup_cheatsheet.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
############
# chocolatey
############
#view all packages installed via choco
choco list --local-only
#view packages with pending updates
choco upgrade all --noop
choco upgrade all -y
#upgrade just the choco tracked version, if the package makes an auto update
choco upgrade {{package_name}} -y -n
#freeze package to specific version
choco pin
choco pin list
choco pin add --name=git --version=1.2.3
choco pin remove --name git
########
# winget
########
winget list --source winget
winget upgrade --include-unknown
choco upgrade all --noop && winget upgrade --include-unknown
#####
# wsl
#####
wsl --update
wsl -d "{dist_name}" -u root -e apt update && wsl -d "{dist_name}" -u root -e apt upgrade -y
wsl --manage "{dist_name}" --set-sparse true
#reset image
wsl --unregister "{dist_name}"; wsl --install -d "{dist_name}"; wsl -s "{dist_name}"
#shrink wsl ext4.vhdx
#https://stephenreescarter.net/how-to-shrink-a-wsl2-virtual-disk/
#https://www.hanselman.com/blog/shrink-your-wsl2-virtual-disks-and-docker-images-and-reclaim-disk-space
#wsl config https://docs.microsoft.com/en-us/windows/wsl/wsl-config#configure-global-options-with-wslconfig
#######
# nuget
#######
#clear local packet cache
dotnet nuget locals all -c