0

In another thread, there is an excellent step by step to completely uninstall VSCode off my Mac so I could truly start over. The steps work perfectly. In my question to try a lot of configurations and extensions, I mess up VSCode pretty often.

Is there a way to build Python file so when I need to uninstall, I can open a terminal window and run a program and be ready to try again? It is not the end of the world to have to type one line at a time, I'm just assuming this is common and been fixed. I'm just not able to find the how.

Rick Segal
  • 60
  • 1
  • 10
  • 1
    I think you may be looking for shell scripts, take a look at the official guide https://support.apple.com/en-gb/guide/terminal/apd53500956-7c5b-496b-a362-2845f2aab4bc/mac – phuzi Aug 26 '21 at 07:25
  • Many thanks. This is exactly the terminology I was missing. Off to go build. Thank you. – Rick Segal Aug 26 '21 at 07:27
  • 1
    @RickSegal : If you **know** what steps to do to uninstall a program, you can write a program doing this - in some shell, or some other programming language, or, since you are on the Mac, in applescript. However, knowing what to do to achieve this is often hard, maybe impossible, when it comes to uninstall some 3rd-party-software. A decently written program, which comes with an installer, should ideally also provide an uninstaller. – user1934428 Aug 26 '21 at 08:21
  • Building a small python program, now that you (@user1934428) said it, makes great sense and will help me learn more which is a great bonus. Thank you! – Rick Segal Aug 26 '21 at 15:40

1 Answers1

0

After doing some studying of Python, I found the OS module. Once you import it, most, if not all the commands to clean up directories, delete files, etc. are in there. I took the list of commands that ran in a ZSH terminal and converted them to os.[relevantcommand] and it worked fine. Now, I can easily clean out a VSCode install by running my VSCleanup.py and start over.

Rick Segal
  • 60
  • 1
  • 10