Introduction
In this tutorial we learn how to install foodcritic
on Ubuntu 20.04.
What is foodcritic
foodcritic is:
Foodcritic has two goals:
To make it easier to flag problems in your Chef cookbooks that will cause Chef
to blow up when you attempt to converge. This is about faster feedback. If you
automate checks for common problems you can save a lot of time.
To encourage discussion within the Chef community on the more subjective stuff
- what does a good cookbook look like? Opscode have avoided being overly
prescriptive. Having a set of rules to base discussion on helps drive out what
the community think is good style.
Ruby-Versions: all
There are three methods to install foodcritic
on Ubuntu 20.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 foodcritic Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install foodcritic
using apt-get
by running the following command:
sudo apt-get -y install foodcritic
Install foodcritic Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install foodcritic
using apt
by running the following command:
sudo apt -y install foodcritic
Install foodcritic 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 foodcritic
using aptitude
by running the following command:
sudo aptitude -y install foodcritic
How To Uninstall foodcritic on Ubuntu 20.04
To uninstall only the foodcritic
package we can use the following command:
sudo apt-get remove foodcritic
Uninstall foodcritic And Its Dependencies
To uninstall foodcritic
and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:
sudo apt-get -y autoremove foodcritic
Remove foodcritic Configurations and Data
To remove foodcritic
configuration and data from Ubuntu 20.04 we can use the following command:
sudo apt-get -y purge foodcritic
Remove foodcritic configuration, data, and all of its dependencies
We can use the following command to remove foodcritic
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge foodcritic
References
Summary
In this tutorial we learn how to install foodcritic
package on Ubuntu 20.04 using different package management tools: apt
, apt-get
and aptitude
.