How to delete an exported environment variable

0 votes

Hi Guys,

I have exported some variables in my system. Now I don't need these variables. How can I remove these exported variables?

Sep 22, 2020 in Linux Administration by akhtar
• 38,260 points
2,759 views

1 answer to this question.

0 votes

Hi@akhtar,

To set an environment we used export command. Now to remove the environment variable from the system, you can use the unset command as shown below.

$ unset variable_name
answered Sep 22, 2020 by MD
• 95,460 points

Related Questions In Linux Administration

0 votes
2 answers

How to change IP address of an Ubuntu VM?

The easiest method is through network manager: 1- ...READ MORE

answered Aug 25, 2020 in Linux Administration by Pistle
• 300 points
14,307 views
0 votes
0 answers

How to set environment variables for bash from within powershell?

Using powershell how do I set the environment variables (here, particularly "ApiSecret") so ...READ MORE

Jun 3, 2022 in Linux Administration by Rahul
• 3,380 points
777 views
0 votes
0 answers

How to split a string into an array in Bash?

In a Bash script, I would like ...READ MORE

Jun 9, 2022 in Linux Administration by Rahul
• 3,380 points
550 views
0 votes
1 answer

How to display a simple list of all disks, like this /dev/sda /dev/sdb ?

You can list all the disk in ...READ MORE

answered Jul 12, 2018 in Linux Administration by DearestOne
• 200 points
5,403 views
0 votes
1 answer
0 votes
1 answer

Deleting an exported environment variable

Just use unset command: unset GNUPLOT_DRIVER_DIR READ MORE

answered Mar 13, 2019 in Linux Administration by DareDev
• 6,890 points
2,285 views
0 votes
1 answer

How do I set variable if a specific package version is installed in CFEngine?

Here is what you can do.Just use packagesmatching to ...READ MORE

answered Jul 12, 2018 in Other DevOps Questions by Atul
• 10,240 points
1,125 views
0 votes
2 answers

Install postgreSQL on Ubuntu

Follow the below commands to install PostgreSQL (PSQL) ...READ MORE

answered Nov 12, 2020 in Database by Prachi
• 140 points
1,161 views
0 votes
1 answer

How to block an IP address to connect my webserver?

Hi@akhtar, You can block one IP address using ...READ MORE

answered Jun 10, 2020 in Linux Administration by MD
• 95,460 points
720 views
0 votes
1 answer

How to delete one user from CentOS system?

Hi@akhtar, You can use userdel command to delete ...READ MORE

answered Jun 19, 2020 in Linux Administration by MD
• 95,460 points
831 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP