Quick Guide to Checking VPS Disk Usage with ncdu

When using a VPS, especially VPSs running Linux operating systems, in some cases users may notice that their VPS is using an unusually large amount of disk space but do not know how to identify which directories or files are large so they can delete them.

Besides using the du command to check directory sizes, there is another, easier method for non-technical users: using the ncdu tool. This software can be easily installed on Linux VPSs running Ubuntu/Debian or CentOS/AlmaLinux/RockyLinux.

Mục lục

How to install ncdu

To install ncdu, simply install its package on your operating system using apt or dnf/yum.

On Ubuntu/Debian:

sudo apt-get install ncdu

On CentOS/AlmaLinux/RockyLinux:

dnf install ncdu

How to use ncdu to identify directory disk usage

Using ncdu is very simple. After installation, just enter the ncdu command and its interface will be displayed. You can use the Up (↑) and Down (↓) arrow keys to move the cursor. To enter a directory, press the Right arrow (→), and to go back to the previous directory, press the Left arrow (←).

If you want to delete a directory or file, move the cursor to it and press the d key to delete, then select yes to confirm.

With ncdu’s intuitive interface, you can easily see which directories are taking up the most space. You can then gradually navigate inside them and remove unnecessary data, freeing up disk space on your VPS for storing important files.

Để lại một bình luận

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *