Skip to content

Instantly share code, notes, and snippets.

@devwolf75
Last active March 4, 2019 19:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devwolf75/85a14b6ca46df83e6f154bbf9e842529 to your computer and use it in GitHub Desktop.
Save devwolf75/85a14b6ca46df83e6f154bbf9e842529 to your computer and use it in GitHub Desktop.
How to remove PowerShell aliases for Scoop installs of tools like Coreutils and other GNU applications
remove-item alias:basename
remove-item alias:cat
remove-item alias:chmod
remove-item alias:comm
remove-item alias:cp
remove-item alias:cut
remove-item alias:date
remove-item alias:dirname
remove-item alias:echo
remove-item alias:env
remove-item alias:expr
remove-item alias:false
remove-item alias:fold
remove-item alias:head
remove-item alias:id
remove-item alias:install
remove-item alias:join
remove-item alias:ln
remove-item alias:ls
remove-item alias:md5sum
remove-item alias:mkdir
remove-item alias:msysmnt
remove-item alias:mv
remove-item alias:od
remove-item alias:paste
remove-item alias:printf
remove-item alias:ps
remove-item alias:pwd
remove-item alias:rm
remove-item alias:rmdir
remove-item alias:sleep
remove-item alias:sort
remove-item alias:split
remove-item alias:stty
remove-item alias:tail
remove-item alias:tee
remove-item alias:touch
remove-item alias:tr
remove-item alias:true
remove-item alias:uname
remove-item alias:uniq
remove-item alias:wc

remove-item alias:curl
remove-item alias:wget
  1. Create a PowerShell profile if you have not. New-Item $profile -force -itemtype file
  2. Edit the profile. notepad $profile
  3. Add the aliases you wish to remove. remove-item alias:<command>
  4. Save and close the PowerShell to reload the profile, or if you wish to use the same window issue the command . $profile to reload the profile.
  5. This can be stepped if you run PowerShell

If you wish to run PowerShell with the defaults you can run it using the -NoProfile flag on the Run window or simply delete the profile that was created.

Creating this as a reminder on my windows fresh installs. Original

@devwolf75
Copy link
Author

I personally use @cbucher 's ConsoleZ with PowerShell and have a profile to remove the aliases for the programs installed by @lukesampson's scoop install coreutils command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment