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

  • SEARCH
  • Home
  • 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 7417119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:38:11+00:00 2026-05-29T07:38:11+00:00

How do I delete files which have been deleted from the Repo but have

  • 0

How do I delete files which have been deleted from the Repo but have not been deleted locally yet?

Essentially, I’m writing a build script in powershell that needs to get the most up-to-date changes from the repo and checkout, but there might be files which were deleted from the repo which haven’t yet been deleted from my local checkout. I mean, one solution is to just delete everything and do a clean checkout, but that’s rather expensive and would take a long time. I could also do a svn status and look for anything with a “D” and delete them locally, but that’s rather tedious. I’d like to also just overwrite any conflicts and –force the checkout for files which need to be merged.

Is there some simple command like revert or a checkout switch that I’m missing?


**Edit: There are actually two different cases that I need to handle:

Part A) In one section, I need to leave anything modified in the working copy alone and just checkout the changes that aren’t conflicts or merged. I need this to never abort, meaning that I just want to throw away anything that has a problem and keep the working/local copy.

I was thinking of using: svn update --accept mine-full --force (Note: This is on the root directory and not individual files)

Part B) In the other section, I want to overwrite any changes and delete files which were deleted in the repo.

I was thinking of using: svn update --accept theirs-full --force (Note: This is on the root directory and not individual files)

Would this work? Or is –force (or –accept) not what I want to be using?


My main concern with using update is that it will abort the entire process if there’s a problem, won’t it? What does –force do with svn update? It also doesn’t delete unversioned items.

Revert isn’t exactly what I need either, is it? It doesn’t delete any of my unversioned items.

Also, doesn’t checkout just do the same thing as update if there are already local files? It would be much simpler to just use checkout in the case where nothing exists yet. The problem is that I cannot specify the –accept parameter with svn checkout. I suppose I could test if the folder exists and then do a checkout or an update accordingly.

  • 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-29T07:38:12+00:00Added an answer on May 29, 2026 at 7:38 am

    For Part A, I used:

    svn update --accept mine-full --force
    

    For Part B, I just did:

    Step 1:

    svn revert $localPath
    

    Step 2:

    svn update $localPath
    

    Step 3 (using powershell + svn status, but can be done with rm -rf grep/sed in *nix):

    svn status $localPath --no-ignore |
                    Select-String '^[?I]' |
                    ForEach-Object {
                        [Regex]::Match($_.Line, '^[^\s]*\s+(.*)$').Groups[1].Value
                    } |
                    Remove-Item -Recurse -Force -ErrorAction SilentlyContinue
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a cron job which will automatically delete .jpg files from
I have the following script which will delete a file off a BlackBerry. However,
I have button, which fires an event, that deletes a record from the database.
Is there a way to NOT delete files after an uninstall?
Tcpflow outputs a bunch of files, many of which are HTTP responses from a
I'm using phpFog and have been deploying via git push -f <repo> to overwrite
Is there a way to delete files on a client computer after they've been
I'm trying to delete a row from my table view and so far have
I have a directory whose files may or may not change every day, during
We have a script to delete the svn:mergeinfo property from all folders inside a

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.