How To Install python-json-schema-validator on Ubuntu 18.04
Introduction
In this tutorial we learn how to install python-json-schema-validator on Ubuntu 18.04.
What is python-json-schema-validator
python-json-schema-validator is:
This package provides a JSON Schema validator conforming to a subset of second draft of the specification.
JSON files can be verified against a schema expressed in the python source code, producing either a SchemaError exception or ValidationError exception.
There are three methods to install python-json-schema-validator on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.
Install python-json-schema-validator Using apt-get
Update apt database with apt-get using the following command.
sudo apt-get update
After updating apt database, We can install python-json-schema-validator using apt-get by running the following command:
sudo apt-get -y install python-json-schema-validator
Install python-json-schema-validator Using apt
Update apt database with apt using the following command.
sudo apt update
After updating apt database, We can install python-json-schema-validator using apt by running the following command:
sudo apt -y install python-json-schema-validator
Install python-json-schema-validator Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.
sudo aptitude update
After updating apt database, We can install python-json-schema-validator using aptitude by running the following command:
sudo aptitude -y install python-json-schema-validator
How To Uninstall python-json-schema-validator on Ubuntu 18.04
To uninstall only the python-json-schema-validator package we can use the following command:
sudo apt-get remove python-json-schema-validator
Uninstall python-json-schema-validator And Its Dependencies
To uninstall python-json-schema-validator and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:
sudo apt-get -y autoremove python-json-schema-validator
Remove python-json-schema-validator Configurations and Data
To remove python-json-schema-validator configuration and data from Ubuntu 18.04 we can use the following command:
sudo apt-get -y purge python-json-schema-validator
Remove python-json-schema-validator configuration, data, and all of its dependencies
We can use the following command to remove python-json-schema-validator configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge python-json-schema-validator
References
Summary
In this tutorial we learn how to install python-json-schema-validator package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.