# Safety v1 to v2 Breaking Changes

Safety v2 is a major improvement in features and we recommend you upgrade as soon as possible.

Below is a list of the difference between Safety 1.x and Safety v2 including breaking changes you want to be aware of.

### New screen/text output

Safety v2's new screen and text output is much more comprehensive than Safety 1.x. It removes the old table format and makes room for more information including report meta-information, packages found, vulnerabilities found as well as remediation (fix) recommendations for each package found with vulnerabilities.

### New and improved JSON structure

Safety 2's JSON output is new and different from Safety 1.x. We overhauled the structure for improved clarity and to allow for the inclusion of a lot more data. Please refer to [Safety 2.0: Outputs](/safety-2/safety-cli-2-scanner/output-formats.md) to read more about this new JSON structure.

### Improved exit codes

Safety 2 now natively supports exit codes. It will return a zero (success) exit code for scans that find no vulnerabilities, and non-zero exit codes for scans that find vulnerabilities or have other issues.

### Safety policy file

Safety 2 introduces local security policy files so that your team can configure and share a security policy for each Python project you are scanning using Safety. Please refer to [Safety 2.0: Policy file](/safety-2/safety-cli-2-scanner/policy-file.md) for detailed documentation and usage examples.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.safetycli.com/safety-2/safety-cli-2-scanner/safety-v1-to-v2-breaking-changes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
