Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6374001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:26:04+00:00 2026-05-25T01:26:04+00:00

I have an uninstall script that cleans up an add-on tool used with an

  • 0

I have an uninstall script that cleans up an add-on tool used with an application.
Versions of the script run on both Windows and Linux.

I’d like to be able to delete the uninstall script file and also the directory in which the script runs too (in both the case of a Windows batch file and also for the case of a Linux bash file). Right now everything but the script and the directory in which it runs remains after it runs.

How can I delete the script and the script’s directory?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T01:26:05+00:00Added an answer on May 25, 2026 at 1:26 am

    In Bash, you can do

    #!/bin/bash
    # do your uninstallation here
    # ...
    # and now remove the script
    rm $0
    # and the entire directory
    rmdir `dirname $0`
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a .NET deployment project. I would like to add a custom uninstall
I have a couple old services that I want to completely uninstall. How can
Have you used VS.NET Architect Edition's Application and System diagrams to start designing a
I have developed a small application that consists of 5 different apk files. I'm
We have an ASP.NET 2.0 application that is available as a trial download. As
I have an application consisting of an ASP.NET web application, a couple of Windows
I have a SQL Server that's currently x86, and I'd like to upgrade it
I have a requirement to create a cross platform application that launches a web
I'm trying to run the build script from HTML5 Boilerplate and I have to
I have a uninstall button in my app. I would like to directly call

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.