How To Install elpa-pg on Debian 12

Learn how to install elpa-pg on Debian 12 with this tutorial. elpa-pg is Emacs Lisp interface for PostgreSQL

Introduction

In this tutorial we learn how to install elpa-pg on Debian 12.

What is elpa-pg

elpa-pg is:

This module lets you access the PostgreSQL object-relational DBMS from Emacs, using its socket-level frontend/backend protocol. The module is capable of automatic type coercions from a range of SQL types to the equivalent Emacs Lisp type.

This is a low level API, and won’t be useful to end users.

There are three methods to install elpa-pg on Debian 12. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install elpa-pg Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install elpa-pg using apt-get by running the following command:

sudo apt-get -y install elpa-pg

Install elpa-pg Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install elpa-pg using apt by running the following command:

sudo apt -y install elpa-pg

Install elpa-pg 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 Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install elpa-pg using aptitude by running the following command:

sudo aptitude -y install elpa-pg

How To Uninstall elpa-pg on Debian 12

To uninstall only the elpa-pg package we can use the following command:

sudo apt-get remove elpa-pg

Uninstall elpa-pg And Its Dependencies

To uninstall elpa-pg and its dependencies that are no longer needed by Debian 12, we can use the command below:

sudo apt-get -y autoremove elpa-pg

Remove elpa-pg Configurations and Data

To remove elpa-pg configuration and data from Debian 12 we can use the following command:

sudo apt-get -y purge elpa-pg

Remove elpa-pg configuration, data, and all of its dependencies

We can use the following command to remove elpa-pg configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge elpa-pg

Dependencies

elpa-pg have the following dependencies:

References

Summary

In this tutorial we learn how to install elpa-pg package on Debian 12 using different package management tools: apt, apt-get and aptitude.