Operations 2 min read

Clearing Interface Configuration with the "clear configuration this" Command

This guide demonstrates how to use the "clear configuration this" command in interface view to remove all configurations from a network interface, restore default settings, and handle the resulting shutdown state, including example CLI steps and expected output.

Practical DevOps Architecture
Practical DevOps Architecture
Practical DevOps Architecture
Clearing Interface Configuration with the "clear configuration this" Command

To quickly clear all configurations on an interface and revert it to default values, execute the clear configuration this command while in interface view.

Example steps:

[tmall] interface gigabitethernet 0/0/1
[tmall-GigabitEthernet0/0/1] display this

Current configuration (example):

interface GigabitEthernet0/0/1
description switch-A
port link-type access

Run the clear command:

[tmall-GigabitEthernet0/0/1] clear configuration this // clears all interface configurations, restoring defaults

The system prompts for confirmation:

Warning: All configurations of the interface will be cleared,and its state will be shutdown. Continue? [Y/N] :y

After confirmation, the device reports execution results: Info: Total 2 command(s) executed, 2 successful, 0 failed. Verify the interface state again: [tmall-GigabitEthernet0/0/1] display this Resulting configuration shows the interface is shut down:

interface GigabitEthernet0/0/1
shutdown // after clearing, the interface is in a shutdown state
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

CLIConfigurationnetworkInterfaceclear command
Practical DevOps Architecture
Written by

Practical DevOps Architecture

Hands‑on DevOps operations using Docker, K8s, Jenkins, and Ansible—empowering ops professionals to grow together through sharing, discussion, knowledge consolidation, and continuous improvement.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.