Git Product home page Git Product logo

xdg-unused-data's Introduction


XDG Unused Data

A simple way to identify unused applications data in user directories such as ~./config and ~/.cache.

Shellcheck   JSON validation  Application Support  Lizense

Table of Contents

About

A package manager (such as dpkg, rpm, apt, or dnf) generally does not remove application files from user directories. Over time, these folders might accumulate redundant files due to the installation and removal of various applications on the system, leading to clutter.

The goal of xdg-unused-data.sh is to identify this files and folders.

Screenshot

How it works

The applications/ folder contains JSON files that provide information about each application, including its executable name and associated files and folders.

The scripts scans for each application. During execution, the script verifies the presence of both the executable and its corresponding files or folders. If the executable is missing but at least one of the associated files or folders exists, it is flagged for attention.

How to delete found files

There is no built-in feature for deleting those files, as an earlier version had such functionality but was subsequently removed. The decision to eliminate this feature was made due to concerns about potential risks associated with modifying or removing user data.

If you wish to delete these files, you have a couple of options. One approach is to manually remove them using a file manager or terminal. However, a more elegant solution involves piping the script's output through xargs to rm.

The script detects when its output is being piped and automatically removes unnecessary information such as names, file sizes, and summary. Alternatively, you can achieve the same behavior by adding the --raw argument`.

⚠️ Data Loss Risk - Proceed with Caution

Before executing any commands, please be aware that you are solely responsible for the consequences of running them. Deleting files using the following commands can lead to permanent data loss, and it is essential to exercise caution and understand what the commands mean before proceeding.

To delete all the files found by the script, you can run the following command:

./xdg-unused-data.sh | xargs rm -rf

If you only want to delete specific files, you can first filter the output using grep:

./xdg-unused-data.sh | grep gimp | xargs rm -rf

Dependencies

The following requirements are needed to run xdg-unused-data

Installation

1. Clone repository:

git clone https://github.com/pawel-0/xdg-unused-data

2. Change directory

cd xdg-unused-data/

3. Set permission

chmod +x ./xdg-unused-data.sh

4. Run application

./xdg-unused-data.sh

Arguments

Usage: xdg-unused-data.sh [argument]

  • --help Print help message
  • --raw Print raw file pathes without colors and additional information to process them further

Contribution

The projects success is all about how many applications it can support. And to achieve that excellent coverage, I could really use your help! If you happen to come across any files or folders in one of the xdg directories that aren't currently covered, I'd be thrilled if you could contribute to this project with a:

Thank you for supporting this project. You are highly appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.