Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 CLI Reference | 2025.1

# p4 logout

Log out a user of the P4 Server by removing a ticket on the user’s workstation, or by invalidating the user's ticket on the server.

## Syntax

    p4 [g-opts] logout [-a | -h ipaddress] [-2] [username]

Syntax conventions

## Description

Log out a user of the P4 Server by removing a ticket on the user’s workstation, or by invalidating the user's ticket on the server. To log out a user other than yourself, include the username option, which requires the `super` access level.

## Options

`-a` | Log out from all workstations that are using the ticket by invalidating the ticket on the server. If combined with username, applies solely to workstations of the specified user. You must have the `super` access level to be able to log out a user other than yourself. In replicated environments, logging out of the central server The one server that is innermost in a multi-server deployment. In the server specification form field for Services, the central server might be specified as “standard” or “commit-server”. If edge servers are part of the multi-server deployment, the central server must be a commit server. See also 'upstream server'. with `p4 logout -a` also logs out of any replica servers. (See also the `-a` option of p4 login.)
`username` | Log out the specified user of the ticket. Requires the `super` access level.
`-h ipaddress` | Invalidate the user's ticket for the specified IP address.
`-2` | Invalidate the user's multi factor authentication. See p4 login2.
`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` available to an operator user and a service user `super` to use `-a` or `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.

## Examples

`p4 logout` | Log out the user that issues this command.
`p4 logout maria` | Log out the specified user by invalidating the ticket issued for the IP address of this machine.
`p4 logout -a maria` | Log out the specified user by invalidating all tickets (including those created using `p4 login -a`) for that user on the server.
`p4 logout -h 10.10.100.1 maria` | Log out the specified user from the specified IP address.

## Related commands

To start a login session (to obtain a ticket) | `p4 login`
To display tickets | `p4 tickets`

Your search for returned results