LinuxCommandLibrary

vkpurge

Remove old and unused kernel versions

TLDR

List all removable kernel versions (or those matching version if the argument is specified)

$ vkpurge list [version]
copy

Remove all unused kernels
$ vkpurge rm all
copy

Remove kernel versions matching version
$ vkpurge rm [version]
copy

SYNOPSIS

`vkpurge` [options] <content_type>

PARAMETERS

-h, --help
    Displays a help message and exits.

-v, --version
    Shows the script's version information and exits.

-t <token>, --token <token>
    Specifies the VK API access token required for authentication. This token grants the script permission to access and modify your VK account data.

-u <user_id>, --user <user_id>
    Used specifically when purging messages, targeting a conversation with a particular user ID.

--type <type>
    Mandatory. Specifies the type of content to purge. Common types include `messages`, `photos`, `posts`, `friends`, or `groups`.

--all
    When used with `--type`, indicates that all items of the specified content type should be purged (e.g., all messages, all photos).

--dry-run
    Simulates the purge operation without actually deleting any data. Useful for verifying what would be deleted.

--confirm
    Bypasses the interactive confirmation prompt before deletion, proceeding directly with the purge. Use with extreme caution.

--after <date>
    Purge content created after the specified date (format typically YYYY-MM-DD or Unix timestamp).

--before <date>
    Purge content created before the specified date (format typically YYYY-MM-DD or Unix timestamp).

--album <album_id>
    When purging photos, specifies a particular album ID from which to delete photos.

DESCRIPTION

The `vkpurge` command, typically implemented as a Python script, is a utility designed to automate the mass deletion of various content types from a Vkontakte (VK) social network account. Its primary purpose is to provide users with a programmatic way to manage their digital footprint on the VK platform, which can be time-consuming and tedious to do manually through the web interface.

Common use cases include purging old private messages, removing uploaded photos or albums, deleting posts from one's wall, or leaving numerous groups. It operates by interacting with the VK API (Application Programming Interface), requiring an access token for authentication. Due to the irreversible nature of deletion, `vkpurge` usually incorporates safety mechanisms such as confirmation prompts and a "dry-run" mode to prevent accidental data loss. It's an indispensable tool for users looking to perform a comprehensive cleanup of their VK profile.

CAVEATS

  • Irreversible Data Loss: Content deleted using `vkpurge` is permanently removed and cannot be recovered. Always use the `--dry-run` option first.
  • API Token Security: Your VK API access token grants significant control over your account. Keep it secure and do not hardcode it directly into scripts or expose it publicly.
  • Not a Standard Linux Command: `vkpurge` is typically a community-developed, third-party Python script, not a utility pre-installed with most Linux distributions. Its availability, features, and behavior may vary depending on the specific implementation.
  • VK API Rate Limits: Frequent or excessive API requests can lead to temporary blocking by VK's API, preventing further operations.
  • Evolving VK API: The VK API can change, which might break older versions of `vkpurge` scripts, requiring updates from the developer.

INSTALLATION

As `vkpurge` is usually a Python script, it is commonly installed via pip. For example, `pip install vk_api` might provide a library, and the `vkpurge` script itself could be part of that package or a separate download from a repository like GitHub. Ensure you have Python and pip installed on your system first.

AUTHENTICATION

To use `vkpurge`, you need a VK API access token. This token can often be obtained through the VK Developers website (e.g., via Implicit Flow for client-side applications) or by using specific libraries that handle the OAuth authentication process. The token must have the necessary permissions (scopes) for the actions you intend to perform (e.g., `messages`, `photos`, `wall`).

HISTORY

The concept of `vkpurge` arose from the need for automated VK content management, driven by users desiring to quickly clean up their extensive digital footprint on the platform. Early versions were often simple, personal scripts, typically written in Python, to delete specific types of content like old messages. Over time, these scripts evolved into more generalized and robust tools, often shared on platforms like GitHub, incorporating features such as different content type support, date filtering, dry-run modes, and user authentication via VK API tokens. Its development has largely been decentralized, reflecting community efforts to address a common user need rather than a single official project.

SEE ALSO

curl(1), jq(1), rm(1)

Copied to clipboard