Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I delete a file from the perforce depot?

Tags:

perforce

p4v

I have a file that I had earlier checked in at my company's depot, but after a lot of re-factoring, I don't need it anymore and need to delete it from the depot, and thereby from my workspace, using the p4v visual client (linux). Is there a way to do this? Right-clicking on the file doesn't show an option to Delete. Is command line delete the only way to go?

like image 984
absessive Avatar asked Jun 14 '12 20:06

absessive


People also ask

How do you delete files after p4 add?

To delete a set of files without transferring them to your workstation when another version of these files already exists in your workspace, use p4 sync -k file , followed by p4 delete -k file . This allows you to delete a file that is in the depot without affecting the file (by the same name) in your workspace.

How do I delete a file from a shelve?

Deleting files shelved by another user or workspace A user with 'admin' access can delete shelved files by adding the -f flag to force the operation: p4 -u admin shelve -d -c 7202 -f Shelved change 7202 deleted.


2 Answers

Select the file in the tree view and either right-click and select Mark for Delete, or click the icon with the red X (the 5th one from the left in my version of P4V).

This will mark the file for deletion but will not actually delete it from the depot until you submit your pending changelist.

Note that this performs a logical delete from the depot; the history of the file will still be present and you'll be able to sync to previous versions of the file. If you want to wipe it completely from the depot along with all its history, you'll need to use the p4 obliterate command which is only available to Perforce administrators.

like image 100
gareth_bowles Avatar answered Oct 13 '22 04:10

gareth_bowles


I had the same problem trying to find the mark for delete option, turns out that you can't have the file checked out at the same time :) So I had to submit my empty file before being able to delete it.

like image 38
Wowbagger Avatar answered Oct 13 '22 06:10

Wowbagger