Install valgrind on Ubuntu: sudo apt-get install valgrind

Learn how to install valgrind with the command sudo apt-get install valgrind on Ubuntus.


 

Ads

Quick installation of valgrind:

Step 1: Update system:

	sudo apt-get update

Step 2: Install: valgrind

Ater updaing the OS run following command to install the packae:

	sudo apt-get install valgrind

Package Details

Package:valgrind
Version:1:3.7.0-0ubuntu3.1
Maintainer:Ubuntu Developers
Home page:http://www.valgrind.org/
Description:memory debugger and profiler Valgrind is a GPL'd tool to help you find memory-management problems in your programs. When a program is run under Valgrind's supervision, all reads and writes of memory are checked, and calls to malloc/new/free/delete are intercepted. . Valgrind can debug more or less any dynamically-linked ELF x86/Linux, amd64/Linux and ppc/Linux executables, without modification, recompilation, or anything. . Valgrind provides a generic infrastructure for supervising the execution of programs called "tools". This is done by providing a way to instrument programs in very precise ways, making it relatively easy to support activities such as dynamic error detection and profiling. The Valgrind distribution currently includes three tools: a memory error detectors, a cache (time) profiler and a heap (space) profiler. Homepage: http://www.valgrind.org/
Distro:Ubuntu 12.04 LTS
Release:
Repo/Section:devel

How to install valgrind on Ubuntu 12.04 LTS?

Install valgrind on Ubuntu: sudo apt-get install valgrind

First of all update your system with the command:

sudo apt-get update

Ads

Above command will download the package lists for Ubuntu 12.04 LTS on your system. This will update the list of newest versions of packages and its dependencies on your system.

After downloading the latest package list with the help of above you can run the installation process.

If valgrind is not installed on your compter then the command 'dpkg -L valgrind' will give followin error.

deepak@deepak-VirtualBox:~$ dpkg -L valgrind
Package `valgrind' is not installed.
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
deepak@deepak-VirtualBox:~$ 

Installing valgrind:

After system update use the following command to install valgrind:

sudo apt-get install valgrind

Above command will confirm before installing the package on your Ubuntu 12.04 LTS Operating System. If you are not already logged in as su, installer will ask you the root password. After completion of the installation you can use the package on your system.

How to uninstall/remove valgrind from Ubuntu 12.04 LTS?

Now we will see the commands for uninstalling the valgrind from Ubuntu 12.04 LTS. For uninstalling this package you can easily use the apt command and remove the package from Linux Operating System.

To remove the valgrind following command is used:

sudo apt-get remove  valgrind

Following command is used to remove the valgrind package along with its dependencies:

sudo apt-get remove --auto-remove valgrind

This will remove valgrind and all its dependent packages which is no longer needed in the system.

Completely removing valgrind with all configuration files:

Following command should be used with care as it deletes all the configuration files and data:

sudo apt-get purge valgrind

or you can use following command also:

sudo apt-get purge --auto-remove valgrind

Above command will remove all the configuration files and data associated with valgrind package. You can can't recover the delete data, so, use this command with care.