p4 logout

Synopsis

Log out of Perforce by removing or invalidating a ticket.

Syntax

p4 [g-opts] logout [-a] [username]

Description

Log a user out of Perforce by removing a ticket on the user’s workstation, or by invalidating the ticket on the service.

If you use p4 logout -a, the ticket remains in the ticket file, but is invalidated on the service: all users of the ticket are logged out simultaneously. You can also remove a single user’s ticket with the -a username option.

Options

-a

Log out all users of the ticket by invalidating the ticket on the service. If a username is specified, that user is logged out. You must have super user access to be able to log out a user other than yourself.

g-opts

See “Global Options”.

Usage Notes

Can File Arguments Use Revision Specifier? Can File Arguments Use Revision Range? Minimal Access Level Required

No

No

list, super to use -a username

  • Tickets are stored in the file specified by the P4TICKETS environment variable. If this variable is not set, tickets are stored in %USERPROFILE%\p4tickets.txt on Windows, and in $HOME/.p4tickets on other operating systems.
  • In replicated environments, logging out of the master server with p4 logout -a also logs you out of any replica servers.

Examples

p4 logout

Log out of Perforce by removing the local session ticket.

p4 logout -a

Log out of Perforce by removing the local session ticket and instructing the Perforce service to invalidate the ticket on all other workstations from which they were logged in.

Related Commands

To start a login session (to obtain a ticket)

p4 login

To display tickets

p4 tickets